Ticket #800 (closed Patch: fixed)
csv type in config/mimes.php
| Reported by: | mospaw | Owned by: | Shadowhand |
|---|---|---|---|
| Priority: | major | Milestone: | 2.2.1 |
| Component: | Core | Version: | 2.2 Release |
| Keywords: | csv, config, mimes | Cc: |
Description
It appears that Mozilla Firefox 3.0.1 on Windows XP Pro SP3 sends the mime type differently than IE7 on the same system. IE7 can upload CSV files (it sends 'application/vnd.ms-excel'), while Firefox cannot.
After some poking around, I discovered that Firefox sends 'text/comma-separated-values'. The current line (39) is:
'csv' => array('text/x-comma-separated-values', 'application/vnd.ms-excel'),
As such, CSV files could not be uploaded by Firefox 3.0.1. Adding another type to acceptable MIME types allows the CSV files to be uploaded with Firefox.
I also checked the RFC on CSV file types (
http://tools.ietf.org/html/rfc4180
) and discovered that the official IANA type registration is 'text.csv', so that has been added as well.
The new line 39 for config/mimes.php is:
'csv' => array('text/x-comma-separated-values', 'application/vnd.ms-excel', 'text/comma-separated-values', 'text/csv'),
I have not tested this in other browsers or OS's, but this should cover most of what's out there.
