Skip to content

Commit 1bd34fe

Browse files
fix: preserve charset in content-type for non-zero byte files
1 parent 45cb22a commit 1bd34fe

2 files changed

Lines changed: 29 additions & 5 deletions

File tree

package-lock.json

Lines changed: 28 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/storage/backend/s3/adapter.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ export class S3Backend implements StorageBackendAdapter {
283283
httpStatusCode: data.$metadata.httpStatusCode || metadata.httpStatusCode,
284284
cacheControl,
285285
eTag: metadata.eTag,
286-
mimetype: metadata.mimetype,
286+
mimetype: contentType || metadata.mimetype,
287287
contentLength: metadata.contentLength,
288288
lastModified: metadata.lastModified,
289289
size: metadata.size,

0 commit comments

Comments
 (0)