移除返回值中非必要URL

master
gongzhenkun 2 years ago
parent b303fb70b1
commit 40cb427bf4

@ -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());

Loading…
Cancel
Save