兴安优化提交
This commit is contained in:
@@ -65,6 +65,9 @@ public class SysFileController
|
||||
@Value("${minio.bucket-name1}")
|
||||
private String bucketName1;
|
||||
|
||||
@Value("${minio.bucket-name3}")
|
||||
private String bucketName3;
|
||||
|
||||
@Autowired
|
||||
private IAlgoService algoService;
|
||||
|
||||
@@ -158,6 +161,27 @@ public class SysFileController
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 文件上传请求
|
||||
*/
|
||||
@PostMapping("uploadMinioPDF")
|
||||
public R<SysFile> uploadMinioPDF(MultipartFile file, String fileName) {
|
||||
|
||||
try {
|
||||
// 上传并返回访问地址
|
||||
String fileNames = FileUploadUtils.uploadMinio(file, bucketName3, fileName);
|
||||
SysFile sysFile = new SysFile();
|
||||
sysFile.setName(FileUtils.getName(fileNames));
|
||||
fileNames = fileNames.replace(miniourl, miniogwurl);
|
||||
sysFile.setUrl(fileNames);
|
||||
return R.ok(sysFile);
|
||||
} catch (Exception e) {
|
||||
log.error("上传文件失败", e);
|
||||
return R.fail(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* 文件上传请求
|
||||
|
||||
Reference in New Issue
Block a user