diff --git a/blade-core-oss/src/main/java/org/springblade/core/oss/QiniuTemplate.java b/blade-core-oss/src/main/java/org/springblade/core/oss/QiniuTemplate.java index 7304fe0..916b5ed 100644 --- a/blade-core-oss/src/main/java/org/springblade/core/oss/QiniuTemplate.java +++ b/blade-core-oss/src/main/java/org/springblade/core/oss/QiniuTemplate.java @@ -187,6 +187,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); // 覆盖上传 @@ -201,7 +203,6 @@ public class QiniuTemplate { retry++; } } - BladeFile file = new BladeFile(); file.setName(key); file.setLink(fileLink(bucketName, key)); return file;