6
votes
2answers
2k views

Making libmagic/file detect .docx files

As seen elsewhere, docx, xlsx and pttx are ZIPs. When uploading them to my web application, file (via libmagic andpython-magic) detects them as being ZIP. I store the contents of the file as a blob ...
2
votes
5answers
4k views

Making Apache recognize MIME type of files without extension

I have some old HTML files that were created elsewhere by someone else. Many of them don't, for some reason, have the .html extension on them. I don't want to have to change them if possible, but ...