getgrav / getgrav/grav-plugin-admin
Attaching CSV File to Page Throws Mime Type Error
- Dominant language
- PHP
- Stars
- 377
- Forks
- 225
- Avg merge
- 11h 51m
- Merged PRs (30d)
- 4
Description
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.
Contributor guide
Assessment
This issue has not been assessed yet.