-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
import csv containing html link errors #22
Comments
The problem this is caused by is HTML content within CSV causing the file to be mis-classified by the mime validator. A possible fix for this is to allow file extensions to declare they allow wildcard mime types, so that |
Is there an example CSV document that could be used for testing? |
As long as the CSV contains any HTML, it would be considered an HTML file - rather than CSV. |
I encountered this when a DataObject I exported to CSV using ModelAdmin contained a DBHTML field with HTML content. After digging I noticed that yes, indeed the mime-type was text/html and not text/plain as expected because of the presence of HTML. Anyway, my workaround was to just allow it in config.
|
Hi, I've got a csv file which contain html content. Most import fine, except for when the html contain
<a href="http://example.com">Click here</a>
When that happens, I get returned the error
File extension does not match known MIME type
The text was updated successfully, but these errors were encountered: