-
Notifications
You must be signed in to change notification settings - Fork 10
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
'FieldFile' object has no attribute 'content_type' #4
Comments
I don't have any idea what it can be. Can you provide code of form and view classes which reproduce the error? |
I have that error in Django 1.11.7.
I take this error in Django admin interface |
Error is hided, when i set |
I see that nsurbay fixed this issue in a commit on May 25, 2018. I found the problem still exists in the version in pypi, came here to research, replaced validators.py with the one from this site, and the error is gone. Thanks for the fix nsurbay! mixkorshun, can you see that pypi gets updated? |
But there is also no new release after that fix ? |
you don't want to do that. if you set check_content_type=False you almost remove the most important security layer in this app. You should not depend on only file extension validation. |
I'm getting this error when trying to use a
SafeFileField
Any idea what the problem might be?
Here's the field declaration:
custom_stylesheet = SafeFileField(null=True, blank=True, upload_to=user_directory_path, allowed_extensions=('css',))
Here's the error:
Stack trace ends with:
Local Vars
The text was updated successfully, but these errors were encountered: