Skip to content

fix content type issue defaulting to octet-stream#224

Merged
jeffpaul merged 1 commit into
10up:developfrom
hugosolar:fix/mime-type-not-being-sent-on-put-blob
Apr 23, 2024
Merged

fix content type issue defaulting to octet-stream#224
jeffpaul merged 1 commit into
10up:developfrom
hugosolar:fix/mime-type-not-being-sent-on-put-blob

Conversation

@hugosolar

@hugosolar hugosolar commented Apr 15, 2024

Copy link
Copy Markdown
Contributor

Description of the Change

This PR ensures that the blob is being sent to the storage with the proper content type as we're experiencing issues with some containers defaulting the content type to application/octet-stream
With this fix, we're not leaving the default content type but sending the file content type directly to the createBlockBlob() function through the $options parameters

Fixes #210

How to test the Change

  • Using the plugin, upload an image to the blob container
  • Using Azure storage explores, verify the proper content type is being set in the blob container

Changelog Entry

Fixed - Ensure we send the proper content type when creating the Block Blob in the container.

Credits

@hugosolar

Checklist:

  • I agree to follow this project's Code of Conduct.
  • I have updated the documentation accordingly.
  • I have added tests to cover my change.
  • All new and existing tests pass.

@hugosolar hugosolar self-assigned this Apr 15, 2024
@jeffpaul jeffpaul removed their request for review April 15, 2024 20:57
@jeffpaul jeffpaul added this to the 4.5.0 milestone Apr 15, 2024
Comment thread includes/class-windows-azure-rest-api-client.php
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Incorrect Content-Type being applied to uploaded files in v 4.4.0 Uploaded files have a bad Blob type, a bad Content Type and don't upload fully

3 participants