文件名

文件名有2个.

Signed-off-by: 初中 <351550660@qq.com>
master^2
初中 2 years ago committed by Gitee
parent e7f1611477
commit 5454fbc68a
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