Opened 11 months ago
Last modified 11 months ago
#35057 closed New feature
[Feature request] Add a setting for project level callable/string for FileField's upload_to — at Initial Version
Reported by: | Vasanth | Owned by: | nobody |
---|---|---|---|
Component: | Database layer (models, ORM) | Version: | dev |
Severity: | Normal | Keywords: | Files, models, storage |
Cc: | Triage Stage: | Unreviewed | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
On the FileField, we have the option to define the default storage that the project uses globally with the option to override it at a field level manually.
It would be great to extend the same functionality to the upload_to argument as well. In some projects, we do find ourselves manually overriding it for every file & image field and it is one more check to remember / check during PRs.
It would be great if we could define a DEFAULT_UPLOAD_TO = "callable_or_string" so that it simplifies working on a project when collaborating with others