Skip to content

Commit 9b09bab

Browse files
committed
fix
1 parent f401337 commit 9b09bab

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

modules/storage/minio.go

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -142,7 +142,14 @@ func (m *MinioStorage) Save(path string, r io.Reader, size int64) (int64, error)
142142
m.buildMinioPath(path),
143143
r,
144144
size,
145-
minio.PutObjectOptions{ContentType: "application/octet-stream"},
145+
minio.PutObjectOptions{
146+
ContentType: "application/octet-stream",
147+
// some storages like:
148+
// * https://developers.cloudflare.com/r2/api/s3/api/
149+
// * https://www.backblaze.com/b2/docs/s3_compatible_api.html
150+
// they do not support "x-amz-checksum-algorithm" header, so use legacy MD5 checksum
151+
SendContentMd5: true,
152+
},
146153
)
147154
if err != nil {
148155
return 0, convertMinioErr(err)

0 commit comments

Comments
 (0)