@ -14,6 +14,9 @@
[2020-06-15]支持区域设置。<br/>
[2020-06-12]初始化插件。<br/>
]]></change-notes>
<prefer-packages>
<prefer-package>*</prefer-package>
</prefer-packages>
<extra-core>
<LocaleFinder class="com.fanruan.fs.s3.repository.S3LocaleFinder"/>
</extra-core>
@ -118,6 +118,7 @@ public class S3ResourceRepository extends BaseResourceRepository {
metadata = s3.getObjectMetadata(bucket, path);
} catch (Exception e) {
metadata = new ObjectMetadata();
metadata.setContentLength(data.length);
}
s3.putObject(bucket, path, new ByteArrayInputStream(data), metadata);