forked from kaleidos/django-validated-file
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixes kaleidos#9: Validate file size before content type
Aside from the fact that checking size is cheaper, this change fixes a misleading and confusing message described in issue kaleidos#9, where a user uploading a MS Word .doc file which is too big is told incorrectly that the content type is wrong. The tests were changed to work (only) with Django 1.6 and above, which changed humanize to add a non-breaking space (\xa0) between a value and its unit. See this ticket for more details: https://code.djangoproject.com/ticket/20246 I tested with these dependencies along with Python 2.7.6: Django==1.6.11 python-magic==0.4.10
- Loading branch information
Showing
2 changed files
with
10 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters