storage icon indicating copy to clipboard operation
storage copied to clipboard

Allow customizing `content-type` when file is`text/html`

Open qiushiyan opened this issue 3 years ago • 1 comments

This line forces the response content type to be text/plain when the object is of type text/html. It would be nice to have a customizable option. My use case with storage is storing some user-generated html files, and this blocks me from getting the actual rendered page but the html source code.

qiushiyan avatar Aug 31 '22 18:08 qiushiyan

Hey @qiushiyan are you self hosting storage-api and want this to be configurable?

inian avatar Sep 11 '22 08:09 inian

Feel free to re-open when providing more information

fenos avatar Dec 15 '22 12:12 fenos

Please can you explain why you are rewriting the content-type as text/plain when the file is text/html. This is super annoying as it means I cant host html files eg for openapi docs using the storage api. Is there anyway to override this behaviour?

I believe the intention of the original ask is to be able to edit or enforce the 'content-type' as 'text/html' when creating download links. Please reopen this issue.

mattaylor avatar May 24 '23 19:05 mattaylor

I actually found a workaround for this but it is still annoying.

mattaylor avatar May 24 '23 20:05 mattaylor