Open tylerecouture opened 6 years ago
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.
avatar = SafeFileField(upload_to=get_file_path, blank=True, null=True, verbose_name='Аватар',
allowed_extensions=('jpg', 'jpeg', 'png', 'gif'))
I take this error in Django admin interface
Error is hided, when i set check_content_type=False
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 ?
Error is hided, when i set
check_content_type=False
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