Skip to content

Mime type not passed to azure storage when tempfiles are used #15948

@swenzel-arc

Description

@swenzel-arc

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

  1. Configure uploads to use temporary files
  2. Use azure storage adapter
  3. Upload an Image file via Web UI
  4. 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.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions