|
|
@ -84,9 +84,7 @@ public class CommonController
|
|
|
|
String filePath = RuoYiConfig.getUploadPath();
|
|
|
|
String filePath = RuoYiConfig.getUploadPath();
|
|
|
|
// 上传并返回新文件名称
|
|
|
|
// 上传并返回新文件名称
|
|
|
|
String fileName = FileUploadUtils.upload(filePath, file);
|
|
|
|
String fileName = FileUploadUtils.upload(filePath, file);
|
|
|
|
String url = serverConfig.getUrl() + fileName;
|
|
|
|
|
|
|
|
AjaxResult ajax = AjaxResult.success();
|
|
|
|
AjaxResult ajax = AjaxResult.success();
|
|
|
|
ajax.put("url", url);
|
|
|
|
|
|
|
|
ajax.put("fileName", fileName);
|
|
|
|
ajax.put("fileName", fileName);
|
|
|
|
ajax.put("newFileName", FileUtils.getName(fileName));
|
|
|
|
ajax.put("newFileName", FileUtils.getName(fileName));
|
|
|
|
ajax.put("originalFilename", file.getOriginalFilename());
|
|
|
|
ajax.put("originalFilename", file.getOriginalFilename());
|
|
|
|