|
@@ -21,15 +21,12 @@ public class UploadController {
|
|
|
@ResponseBody
|
|
|
@PostMapping("/uploadImage")
|
|
|
public R<UploadInfo> addSave(@RequestParam("file") MultipartFile file) throws IOException {
|
|
|
- //限制文件大小
|
|
|
-
|
|
|
+ //限制文件大小??
|
|
|
// 上传文件路径
|
|
|
String filePath = RuoYiConfig.getUploadPath();
|
|
|
// 上传并返回新文件名称
|
|
|
String fileNewName = FileUploadUtils.upload(filePath, file);
|
|
|
UploadInfo uploadInfo = new UploadInfo();
|
|
|
-
|
|
|
-// uploadInfo.setFileName(fileName);
|
|
|
uploadInfo.setUrl(fileNewName);
|
|
|
|
|
|
//返回文件名 和存放路径
|