Skip to content

Commit 0d16cf4

Browse files
committed
fix minio ts error
1 parent b5cf36e commit 0d16cf4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/imageRouter/minio.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,9 @@ export function uploadImage(imagePath, callback) {
3535
const key = path.join('uploads', path.basename(imagePath))
3636
const protocol = config.minio.secure ? 'https' : 'http'
3737

38-
minioClient.putObject(config.s3bucket, key, buffer, buffer.length, getImageMimeType(imagePath), function (err, data) {
38+
minioClient.putObject(config.s3bucket, key, buffer, buffer.length, {
39+
ContentType: getImageMimeType(imagePath)
40+
}, function (err, data) {
3941
if (err) {
4042
callback(err, null)
4143
return

0 commit comments

Comments
 (0)