feat: preview image (#47930)

* feat: preview image

* feat: test

* feat: download false

* feat: review
This commit is contained in:
叶枫 2024-03-20 13:34:04 +08:00 committed by GitHub
parent ec4591b64a
commit d1da5f7f8f
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -92,6 +92,7 @@ async function uploadFile(client, filePath, refValue) {
'x-oss-object-acl': 'public-read',
// https://help.aliyun.com/zh/oss/developer-reference/prevent-objects-from-being-overwritten-by-objects-that-have-the-same-names-3
'x-oss-forbid-overwrite': 'false',
'Content-Disposition': 'inline',
};
// Set content-type to allow individual preview of images
if (path.extname(filePath) === '.png') {