修复七牛云上传后无法获取OriginalName为空的问题

This commit is contained in:
F嘉阳 2021-02-16 13:20:41 +08:00
parent e22dc339f0
commit 81a6b4be1f
1 changed files with 2 additions and 1 deletions

View File

@ -158,6 +158,8 @@ public class QiniuTemplate {
@SneakyThrows
public BladeFile put(String bucketName, InputStream stream, String key, boolean cover) {
BladeFile file = new BladeFile();
file.setOriginalName(key);
makeBucket(bucketName);
key = getFileName(key);
// 覆盖上传
@ -172,7 +174,6 @@ public class QiniuTemplate {
retry++;
}
}
BladeFile file = new BladeFile();
file.setName(key);
file.setLink(fileLink(bucketName, key));
return file;