|
|
|
@ -126,6 +126,7 @@ public class uploadController {
|
|
|
|
|
return ResultVOUtils.error(ResultEnum.DATA_ERROR, "上传文件只能是 jpg,png,doc,pdf 格式");
|
|
|
|
|
}
|
|
|
|
|
String newName = UUID.randomUUID() + fileType;//生成新文件名
|
|
|
|
|
// String savePath = filePath + "/register/file/" + type;
|
|
|
|
|
String savePath = filePath + "/register/file/" + type;
|
|
|
|
|
String savePath1 = fileLpath + "?type=" + type;
|
|
|
|
|
String fileFullName = savePath + "/" + newName;
|
|
|
|
@ -140,7 +141,8 @@ public class uploadController {
|
|
|
|
|
// MinioUtil.uploadFile(fileFullName, file);
|
|
|
|
|
Map<String, String> rMap = new HashMap<>();
|
|
|
|
|
rMap.put("msg", "上传成功");
|
|
|
|
|
rMap.put("name", fileUrl + savePath1 + "&name=" + newName);
|
|
|
|
|
// rMap.put("name", fileUrl + savePath1 + "&name=" + newName);
|
|
|
|
|
rMap.put("name", newName);
|
|
|
|
|
rMap.put("type", type);
|
|
|
|
|
return ResultVOUtils.success(rMap);
|
|
|
|
|
} catch (Exception e) {
|
|
|
|
|