From d1eb76ad5d3095c6495bdc831adb2d2a546b97cb Mon Sep 17 00:00:00 2001
From: E1ED922C1E9526DD63272D7EC5C6CB77 <E1ED922C1E9526DD63272D7EC5C6CB77@i-search.com.cn>
Date: 星期二, 29 十二月 2020 14:21:12 +0800
Subject: [PATCH] Merge branch 'master' of https://gitee.com/huoxiong/hx_common

---
 src/main/java/com/hx/util/COSUtil.java |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/hx/util/COSUtil.java b/src/main/java/com/hx/util/COSUtil.java
index f0ae88f..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");
@@ -57,7 +57,7 @@
 
 		//鎷兼帴璺緞
 		StringBuilder imgUrl = new StringBuilder();
-		imgUrl.append("https://"+bucketName+"-"+secretId+".cos."+regionName+".myqcloud.com");
+		imgUrl.append("https://"+bucketName+".cos."+regionName+".myqcloud.com");
 		if(key.startsWith("/")){
 			imgUrl.append(key);
 		}else{

--
Gitblit v1.8.0