#26562: Introduce Storage and FileSystemStorage alternate save behaviour -------------------------------------+------------------------------------- Reporter: freshquiz | Owner: nobody Type: New feature | Status: new Component: File | Version: master uploads/storage | Severity: Normal | Resolution: Keywords: file FileField | Triage Stage: Accepted storage overwrite filepath | Has patch: 0 | Needs documentation: 0 Needs tests: 0 | Patch needs improvement: 0 Easy pickings: 0 | UI/UX: 0 -------------------------------------+------------------------------------- Changes (by aaugustin):
* needs_docs: => 0 * needs_better_patch: => 0 * needs_tests: => 0 * stage: Unreviewed => Accepted Comment: I don't see why a new configurability mechanism would be needed. There's already [https://docs.djangoproject.com/en/1.9/ref/settings/#default-file- storage DEFAULT_FILE_STORAGE] for this purpose. Even if it's entirely doable to subclass `FileSystemStorage` to implement this behavior and configure it in DEFAULT_FILE_STORAGE, I think Django could provide such a storage backend natively e.g. as `django.core.files.storage.OverwritingFileSystemStorage`. (Better names welcome.) `OverwritingFileSystemStorage` would likely be a superclass of `FileSystemStorage` because it has fewer features. I'm accepting the ticket but I'd like another core dev to confirm before we move forwards with a patch. -- Ticket URL: <https://code.djangoproject.com/ticket/26562#comment:1> 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 django-updates+unsubscr...@googlegroups.com. To post to this group, send email to django-updates@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-updates/067.3a8db5a4695f681cef5a66dc738b1971%40djangoproject.com. For more options, visit https://groups.google.com/d/optout.