update 优化 oss上传直接从请求头获取文件类型

2.X
疯狂的狮子Li 5 months ago
parent 05ad9bc907
commit 3542bb92aa

@ -42,7 +42,7 @@ public class RemoteFileServiceImpl implements RemoteFileService {
try {
String suffix = StringUtils.substring(originalFilename, originalFilename.lastIndexOf("."), originalFilename.length());
OssClient storage = OssFactory.instance();
UploadResult uploadResult = storage.uploadSuffix(file, suffix);
UploadResult uploadResult = storage.uploadSuffix(file, suffix, contentType);
// 保存文件信息
SysOssBo oss = new SysOssBo();
oss.setUrl(uploadResult.getUrl());

Loading…
Cancel
Save