fix cos upload content length type

This commit is contained in:
ywlmac
2026-05-13 16:20:50 +08:00
parent a241c2b81e
commit 8e75c10fa2
3 changed files with 12 additions and 2 deletions
+1 -1
View File
@@ -374,7 +374,7 @@ func UploadCertificatePNGToCOS(ctx context.Context, pngBytes []byte, defaultObje
_, err = client.Object.Put(ctx, objectKey, bytes.NewReader(pngBytes), &cos.ObjectPutOptions{
ObjectPutHeaderOptions: &cos.ObjectPutHeaderOptions{
ContentType: "image/png",
ContentLength: len(pngBytes),
ContentLength: int64(len(pngBytes)),
CacheControl: "public, max-age=31536000, immutable",
},
})