You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please specify at least one condition in which mimetypes may be left blank.
On the one hand, you could explicitly check to see if 'data-fp-extensions' in additional_params, in which case mimetypes should not be included.
On the other hand, there might be other instances where mimetypes cause a problem. It might be hard to find all those edge cases. Perhaps add a constant NoMimetypes = object() singleton into forms.py, and do not include mimetypes if mimetypes == NoMimetypes.
The text was updated successfully, but these errors were encountered:
Since I don't know what of the possible solutions would be preferred by devs, I'm not going to submit a pull request on this. The workaround is here in case anyone else has the problem.
I'm working with a codebase which specifies
data-fp-extensions
.I have specified
FPFileField.mimetypes
to be nothing,None
,''
,(,)
, and always it comes back*/*
. So then I read the code and figured out why:https://github.com/Ink/django-filepicker/blob/0671c4315b61f897358367a757b6ef8444aa183b/django_filepicker/forms.py#L33
Please specify at least one condition in which mimetypes may be left blank.
On the one hand, you could explicitly check to see if
'data-fp-extensions' in additional_params
, in which case mimetypes should not be included.On the other hand, there might be other instances where mimetypes cause a problem. It might be hard to find all those edge cases. Perhaps add a constant
NoMimetypes = object()
singleton into forms.py, and do not include mimetypes ifmimetypes == NoMimetypes
.The text was updated successfully, but these errors were encountered: