Skip to content

Conversation

@aixasz
Copy link

@aixasz aixasz commented Aug 28, 2025

Fixes

Issue #47

Description

  • Modified WriteAsync to detect MIME type from blob path using _mime.TryGetContentType
  • Falls back to "application/octet-stream" when no mapping is found
  • Uses BlobUploadOptions with BlobHttpHeaders to ensure Content-Type is stored
  • Fixes issue where browsers download images instead of rendering inline

- Modified WriteAsync to detect MIME type from blob path using _mime.TryGetContentType
- Falls back to "application/octet-stream" when no mapping is found
- Uses BlobUploadOptions with BlobHttpHeaders to ensure Content-Type is stored
- Fixes issue where browsers download images instead of rendering inline
@aixasz aixasz force-pushed the feature/azure-blob-content-type-according-to-file-extension branch from eadbcb7 to 71f044f Compare August 28, 2025 08:25
@robinrodricks
Copy link
Owner

Looks good but can you rewrite it to not use the Microsoft.AspNetCore.StaticFiles package, as that pulls in the entire ASP.net core server set of packages!

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.

2 participants