#27689: FileSystemStorage().get_valid_name() may return empty string
-------------------------------------+-------------------------------------
Reporter: Victor Porton | Owner: nobody
Type: Bug | Status: new
Component: File | Version: 1.10
uploads/storage |
Severity: Normal | Resolution:
Keywords: | Triage Stage:
| Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Tim Graham):
I disagree -- the documentation does not imply that behavior. While we
could change how `FileSystemStorage` works, we couldn't also force all the
existing third-party storages to obey the proposed contract. Perhaps the
`get_valid_name()` name is misleading and might be better named something
like `sanitize_name()`, however, I don't see value in putting a change
like that through deprecation process at this point. For what it's worth,
it seems like [https://docs.djangoproject.com/en/dev/howto/custom-file-
storage/#django.core.files.storage.get_available_name
get_available_name()] might be a better match for your use case.
I'll leave the ticket open for other opinions.
--
Ticket URL: <https://code.djangoproject.com/ticket/27689#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/065.7d8e3ff32daf6ecb9a35a7aaf9462857%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.