From c3286e41fa42f444db17d217d86e8038d0442662 Mon Sep 17 00:00:00 2001 From: momo <1012651275@qq.com> Date: Mon, 28 Aug 2023 15:17:36 +0800 Subject: [PATCH] =?UTF-8?q?fix:=E8=B0=83=E6=95=B4=E4=B8=8A=E4=BC=A0?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils/file/upload.go | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/utils/file/upload.go b/utils/file/upload.go index 9991abaa..5108daea 100644 --- a/utils/file/upload.go +++ b/utils/file/upload.go @@ -102,8 +102,9 @@ func (upload *Upload) UploadFileByBase64(req *UploadBaseReq) (*UploadBaseRes, er // 创建S3对象存储请求 s3req, _ = svc.PutObjectRequest( &s3.PutObjectInput{ - Bucket: bucketName, - Key: &resourceId, + Bucket: bucketName, + Key: &resourceId, + CacheControl: aws.String("no-cache, must-revalidate"), }, ) @@ -226,8 +227,9 @@ func (upload *Upload) UploadFileByByte(req *UploadBaseReq) (*UploadBaseRes, erro // 创建S3对象存储请求 s3req, _ = svc.PutObjectRequest( &s3.PutObjectInput{ - Bucket: bucketName, - Key: &resourceId, + Bucket: bucketName, + Key: &resourceId, + CacheControl: aws.String("no-cache, must-revalidate"), }, )