#1994 closed enhancement (duplicate)
[patch] Custom upload_to per instance of FileField
Reported by: | Owned by: | nobody | |
---|---|---|---|
Component: | Core (Other) | Version: | |
Severity: | normal | Keywords: | fs-rf-fixed |
Cc: | Triage Stage: | Design decision needed | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
I find myself constantly limited by the upload_to field for FileField. Namely, I often want to specify different upload_to directories on an individual basis, not just wanting to dump all files into one directory, or use the strftime.
This patch addresses that by adding an optional keyword argument 'upload_to' to the save_XXX_file method.
Attachments (2)
Change History (9)
by , 18 years ago
Attachment: | upload_to.diff added |
---|
comment:1 by , 18 years ago
Component: | Admin interface → Core framework |
---|
comment:2 by , 18 years ago
Just wanted to also note that this patch is 100% backwards compatible. If you choose not to use the new keyword when manually calling the save_XXX_file method, then the behaviour will be the same as it is now.
comment:3 by , 18 years ago
Triage Stage: | Unreviewed → Design decision needed |
---|
comment:4 by , 18 years ago
Well, I wrote this patch a *long* time ago. I don't know if it's still the best way to do it, but I do believe that FileField needs *some* kind of easy way to do custom directories.
comment:6 by , 17 years ago
Keywords: | fs-rf added |
---|
comment:7 by , 16 years ago
Keywords: | fs-rf-fixed added; fs-rf removed |
---|
Forgot to set the Component