You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
it just occurred to me that this should actually be a frontend thing. Because, AFAIK, the mime type is set by the browser and packed into the header of the request so that the other side knows how to interpret the bytes sent. At the corresponding FastApi endpoint, Starlett converts the request into an uploaded file and simply reads the mime type.
Later in the PrePo pipeline, however, it may be that Magic determines the mime type incorrectly from File, because docx files are actually ZIP files that contain a lot of XMLs etc.. But the file should actually be placed in the correct pipeline in the backend API worker, where Magic is no longer used at all
Internally, we use magic to identify the mime type of uploaded files. magic is a wrapper around the "file" library.
The file library on our lt servers (including ltdwise and hcdsgpu2) incorrectly detects docx files as application/zip.
We should fix this. I found this on stackoverflow https://serverfault.com/questions/338087/making-libmagic-file-detect-docx-files/377792#377792 but I am not sure if this is a proper fix.
The text was updated successfully, but these errors were encountered: