inveniosoftware / invenio-files-rest

REST API for uploading/downloading files for Invenio.
https://invenio-files-rest.readthedocs.io
MIT License
9 stars 67 forks source link

Wrong mime type returned for .ttl files #263

Closed manonthegithub closed 3 years ago

manonthegithub commented 3 years ago

Package version (if known): any

Describe the bug

When using send_stream the wrong mime type application/octet-stream is returned for '.ttl' files (text/turtle expected)

Additional context

https://en.wikipedia.org/wiki/Turtle_(syntax)

manonthegithub commented 3 years ago

Sorry need more investigation... looks like it works for some versions

lnielsen commented 3 years ago

Note also that Files-REST is very restrictive with which MIME types are sent because the user uploaded files are served from the same domain as the app, and thus, we must essentially prevent the browser from rendering most things to avoid XSS attack vectors.