Sorry to start with filefield again, but it is the module on top of the stack.
I have a filefield with kml and kmz as allowed extensions. Just tried to upload a kml file saved from latest version of GoogleEarth and got the failure notice:
The selected file swnrm.kml could not be uploaded. The file contents (text/xml) do not match its extension (kml).
Attached screenshot shows:
- KML is listed in the filefield as an allowed type
- Apache knows about this mimetype
- The source file declares its kml header properly (as far as I can tell: http://code.google.com/apis/kml/documentation/kmlreference.html)
Watchdog provided an interesting diversion:
{ "data": "\x3cdiv class=\"messages error\"\x3e\nAn unrecoverable error occurred. The uploaded file likely exceeded the maximum file size (30 MB) that this server supports.\x3c/div\x3e\n" }
The file itself (*not* attached...kml is not an allowed filetype on drupal.org!) is actually 12kb, but can be viewed/downloaded here:
http://swnrm.boab.info/sites/default/files/uploads/managed/swnrm.kml
Anyone have a clue here?
| Comment | File | Size | Author |
|---|---|---|---|
| kml-mime-error.png | 72.69 KB | boabjohn |
Comments
Comment #1
boabjohn commentedLooking further, this thread looks relevant:
http://drupal.org/node/444724
Comment #2
quicksketchI believe you're correct. The error you're receiving is caused by MimeDetect module, you may need to adjust your "Magic file" that identifies file contents with extensions. I'm marking fixed, as this issue is not directly caused by FileField.