Closed dmitshur closed 9 years ago
Some file types we may want to keep as application/octet-stream even if there is a "proper" mime type. I may want you to download the .html file as is instead of it displaying as a webpage. I suppose you could still right click and "Save As..." as we do with images. Yeah ok. As long as it's still possible to download it verbatim without any form of pain, I'm good with this.
Absolutely, it should still be possible to explicitly download through the usual "Save as..." mechanism. That is a requirement I do not want to break.
But this will allow one to preview common types that browsers display well without being forced to download to disk. So it's an additive enhancement.
For example, uploading a .html file should serve it as
text/html
content type (rather thanapplication/octet-stream
as it is now).See https://godoc.org/mime for how this can be done automatically for many common types.