symphonicc / multer-azure-blob-storage

ES6 & Typescript friendly multer storage engine for Azure's blob storage.
MIT License
19 stars 25 forks source link

Azure Blob always download image instead preview #4

Closed ruimfernandes closed 5 years ago

ruimfernandes commented 6 years ago

Hi!

I'm having troubles while uploading blobs. I'm uploading an .png image but I guess the content-type isn't being set and therefore, in portal.azure, when I press the blob's download button the result isn't expected... I searched at this module for something like the code below but didn't find anything related.

{
    contentSettings: {contentType: file.mimetype}
}

Expected result:

Current result:

Have you ever faced this issue? Is there any workaround?

Something related on others modules https://github.com/MantaCodeDevs/multer-azure-storage/issues/4

Sliverb commented 6 years ago

Not yet. I shall poke around and see what i can find.

Sliverb commented 6 years ago

Sadly, I am unable to find details around this. My best guess is it is by design for the portal. When you are fetching the image back, then I think that's when you will have the power to set the contentType to your liking. Want to have the community weigh in on this.

You got me very curious about this, I think you should reopen the question on the azure-storage project

markmblc commented 5 years ago

This is addressed in my pull request. Automatically set the disposition to 'inline'

https://github.com/symphonicc/multer-azure-blob-storage/pull/11

Sliverb commented 5 years ago

Fixed by @markmblc PR