Why NocoBase rejects your .doc and .xls uploads
NocoBase file storage lets you restrict uploads to a list of allowed MIME types. Someone on the official forum filled that list in correctly — application/pdf , application/msword , application/vnd.ms-excel , and the two OOXML types — and found that legacy Word and Excel files were still refused with "Mime type not allowed by storage rule" ( t/13553 ). The thread is instructive for how it…
NocoBase file storage only permits uploads of specific MIME types. Users attempted to restrict uploads to .doc and .xls files, but found these legacy formats were still rejected. A forum post reported that while PDF files were accepted, .doc and .xls were not. After troubleshooting, it was discovered that NocoBase inspects the file's contents to determine its MIME type, rather than relying on the Content-Type announced by the browser or the filename extension.
Legacy Word and Excel files, which share the same OLE2 Compound File Binary container, are identified as application/x-cfb, while modern Office files are recognized as application/zip. Consequently, allowing only application/x-cfb enables uploads of both legacy and modern Office files.
Written by urgent.news from Dev.to's reporting — not their text. Machine-written — it may contain errors, so check the original before relying on it.