Describe the Bug
When uploads are configured to use temporary files, the mime types are not stored with the blob object in azure storage.
The fix is an easy one-liner. In addition to the abort signal here:
|
abortSignal: AbortController.timeout(30 * 60 * 1000), |
There just needs to be the content type header:
blobHTTPHeaders: { blobContentType: file.mimeType }
I'll create a PR to fix this next.
Link to the code that reproduces this issue
https://github.com/thearc-hq/oss-payload/blob/test-azure-svg-upload/test/_community/int.spec.ts#L28
Reproduction Steps
- Configure uploads to use temporary files
- Use azure storage adapter
- Upload an Image file via Web UI
- Check the content-type header when downloading the file (it is
application/octet-stream)
Which area(s) are affected?
plugin: storage-*
Environment Info
I think we don't need this.
Describe the Bug
When uploads are configured to use temporary files, the mime types are not stored with the blob object in azure storage.
The fix is an easy one-liner. In addition to the abort signal here:
payload/packages/storage-azure/src/handleUpload.ts
Line 37 in 94d2249
There just needs to be the content type header:
I'll create a PR to fix this next.
Link to the code that reproduces this issue
https://github.com/thearc-hq/oss-payload/blob/test-azure-svg-upload/test/_community/int.spec.ts#L28
Reproduction Steps
application/octet-stream)Which area(s) are affected?
plugin: storage-*
Environment Info