#33993: Allow instance to be passed into the FileField storage callable param
-------------------------------------+-------------------------------------
Reporter: Viicos | Owner: nobody
Type: New feature | Status: closed
Component: File | Version: dev
uploads/storage |
Severity: Normal | Resolution: needsinfo
Keywords: callable, storage, | Triage Stage:
filefield | Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Comment (by Viicos):
Replying to [comment:2 Carlton Gibson]:
> This looks likely feasible for the `generate_filename` usage, but I
can't see immediately whether there'd be issues with `path` and `url` and
so on. (After file creation, we get the filename from the storage, so we'd
need to handle not having that available.)
Isn't this already the case now, as you can use a callable to get the
storage object? What I was suggesting is having the ability to pass the
instance (and additionally the filename) to this callable.
--
Ticket URL: <https://code.djangoproject.com/ticket/33993#comment:3>
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 view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/010701831e956e4a-caec7004-dfee-45a9-bfe9-7e6812b46191-000000%40eu-central-1.amazonses.com.