grav-plugin-admin icon indicating copy to clipboard operation
grav-plugin-admin copied to clipboard

Attaching CSV File to Page Throws Mime Type Error

Open thekenshow opened this issue 3 years ago • 0 comments

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.

thekenshow avatar Feb 25 '22 16:02 thekenshow