VILLASframework / web-backend

A go implementation of the backend for VILLASweb
https://fein-aachen.org/en/projects/villas-web/
GNU General Public License v3.0
1 stars 2 forks source link

Backend uses wrong mime-type for uploaded Markdown file (possibly also others) #69

Closed stv0g closed 1 year ago

stv0g commented 3 years ago

The type field of uploaded files is sometimes wrong.

This is good overview of Mime-types: https://wiki.selfhtml.org/wiki/MIME-Type/%C3%9Cbersicht

stv0g commented 3 years ago

The backend uses the wrong mime-type application/octet-stream

stv0g commented 3 years ago

Which mime-type is actually used? Is this autodetected by the backend or provided by the uploader using the HTTP Content-type header?

stv0g commented 3 years ago

https://git.rwth-aachen.de/acs/public/villas/web-backend-go/-/blob/master/routes/file/file_methods.go#L88

stv0g commented 3 years ago

Seems like the bug is not caused by the backend but by VILLAScontroller uploading the files with a wrong mime-type