-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Labels
enhancementNew feature or requestNew feature or request
Description
I'm looking for filename sanitation. For example, Windows cannot correctly handle filenames containing <
, >
, :
, "
, /
, \
, |
, ?
or *
, ASCII control characters or the null byte. In addition, Windows reserves some filenames, including CON
, PRN
, AUX
, NUL
and others. Filenames in Windows cannot end in a space or a dot. macOS and Linux have their own restrictions too.
Right now, the setting "keep_original_filename"
can only be set to True or False. I propose these values instead:
"filenames": "keep"
that behaves like"keep_original_filename": True
"filenames": "random"
that behaves like"keep_original_filename": False
"filenames": "sanitize"
that will sanitize the filenames using a library likepathvalidate
Does django-middleware-fileuploadvalidation provide this functionality already? Maybe I missed it.
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request