mirror of
https://github.com/hcengineering/platform.git
synced 2025-01-24 04:17:50 +00:00
fix content-type
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
6f9245158f
commit
c31d8f4c7a
@ -53,7 +53,7 @@ async function minioUpload (minio: Client, workspace: string, file: UploadedFile
|
||||
'Content-Type': file.mimetype
|
||||
}
|
||||
|
||||
const resp = await minio.putObject(workspace, id, file.data, meta)
|
||||
const resp = await minio.putObject(workspace, id, file.data, file.size, meta)
|
||||
|
||||
console.log(resp)
|
||||
return id
|
||||
@ -96,7 +96,12 @@ export function start (transactorEndpoint: string, elasticUrl: string, minio: Cl
|
||||
return console.log(err)
|
||||
}
|
||||
res.status(200)
|
||||
res.setHeader('Content-Type', stat.metaData['Content-Type'])
|
||||
|
||||
const contentType = stat.metaData['content-type']
|
||||
if (contentType !== undefined) {
|
||||
res.setHeader('Content-Type', contentType)
|
||||
}
|
||||
|
||||
dataStream.on('data', function (chunk) {
|
||||
res.write(chunk)
|
||||
})
|
||||
|
Loading…
Reference in New Issue
Block a user