From 308f357c4feb2e0911c33ce28af4c3a2fa7af869 Mon Sep 17 00:00:00 2001 From: mei23 Date: Thu, 26 Jul 2018 10:27:09 +0900 Subject: [PATCH] Set Content-Type to object-storage --- src/services/drive/add-file.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/drive/add-file.ts b/src/services/drive/add-file.ts index 91bf5b010c..dd41f4462f 100644 --- a/src/services/drive/add-file.ts +++ b/src/services/drive/add-file.ts @@ -25,7 +25,7 @@ async function save(readable: stream.Readable, name: string, type: string, hash: const minio = new Minio.Client(config.drive.config); const id = uuid.v4(); const obj = `${config.drive.prefix}/${id}`; - await minio.putObject(config.drive.bucket, obj, readable); + await minio.putObject(config.drive.bucket, obj, readable, size, { 'Content-Type': type }); Object.assign(metadata, { withoutChunks: true,