Merge pull request !1 from 初中/N/A
master
暴走的咖喱 2 years ago committed by Gitee
commit 253ed131c5
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F

@ -57,7 +57,7 @@ public class SysUploadTaskServiceImpl extends ServiceImpl<SysUploadTaskMapper, S
Date currentDate = new Date();
String bucketName = minioProperties.getBucket();
String fileName = param.getFileName();
String suffix = fileName.substring(fileName.lastIndexOf("."), fileName.length());
String suffix = fileName.substring(fileName.lastIndexOf(".")+1, fileName.length());
String key = StrUtil.format("{}/{}.{}", DateUtil.format(currentDate, "YYYY-MM-dd"), IdUtil.randomUUID(), suffix);
String contentType = MediaTypeFactory.getMediaType(key).orElse(MediaType.APPLICATION_OCTET_STREAM).toString();
ObjectMetadata objectMetadata = new ObjectMetadata();

Loading…
Cancel
Save