grav-plugin-admin
grav-plugin-admin copied to clipboard
Attaching CSV File to Page Throws Mime Type Error
I have a client that edits their data in Excel, exports to CSV, and uploads to a Grav page (default dropzone). After upgrading to 1.7.30, they started getting the following error when uploading the CSV:
An error occurred while trying to upload the file EV ZX All Parts REV 2.csv. The mime type does not match to file extension`.
The issue was resolved by copying system/mime.yaml
to user/config/mime.yaml
(thanks, @mahagr!) and editing the CSV mime type as follows:
csv:
- text/csv
- application/vnd.ms-excel
The Excel->CSV workflow is pretty common, so system/mime.yaml
should be modified to include MS's vendor-specific mime type.