From ee972831c32537e5eb8972ed007136c6ba745757 Mon Sep 17 00:00:00 2001 From: ChenJiaHe <763432473@qq.com> Date: 星期一, 28 十二月 2020 16:25:30 +0800 Subject: [PATCH] 优化 --- src/main/java/com/hx/util/COSUtil.java | 2 +- 1 files changed, 1 insertions(+), 1 deletions(-) diff --git a/src/main/java/com/hx/util/COSUtil.java b/src/main/java/com/hx/util/COSUtil.java index 42702d6..0137cac 100644 --- a/src/main/java/com/hx/util/COSUtil.java +++ b/src/main/java/com/hx/util/COSUtil.java @@ -48,7 +48,7 @@ //寮�濮嬩笂浼� ObjectMetadata objectMetadata = new ObjectMetadata(); // 璁剧疆杈撳叆娴侀暱搴︿负500 - objectMetadata.setContentLength(500); + objectMetadata.setContentLength(localFile.getSize()); // 璁剧疆 Content type, 榛樿鏄� application/octet-stream,瀵逛簬鏈湴鏂囦欢涓婁紶锛岄粯璁ゆ牴鎹湰鍦版枃浠剁殑鍚庣紑杩涜鏄犲皠 // 锛屼緥濡� jpg 鏂囦欢鏄犲皠 涓篿mage/jpeg瀵逛簬娴佸紡涓婁紶 榛樿鏄� application/octet-stream //objectMetadata.setContentType("application/pdf"); -- Gitblit v1.8.0