#10788: Actual name of uploaded file available later than it was in 1.0
---------------------------------------------+------------------------------
Reporter: kmtracey | Owner: jacob
Status: closed | Milestone: 1.1
Component: File uploads/storage | Version: SVN
Resolution: wontfix | Keywords:
Stage: Design decision needed | Has_patch: 0
Needs_docs: 0 | Needs_tests: 0
Needs_better_patch: 0 |
---------------------------------------------+------------------------------
Comment (by anonymous):
Replying to [comment:10 jacob]:
> Given Armin's notes here, and Marty's concurrence on django-developers
(http://groups.google.com/group/django-
developers/browse_thread/thread/560b3d7cad9bd491), I'm going to mark this
wontifx and note in the 1.1 release notes that the final file name isn't
available until the file has actually been saved to disk. It's of dubious
use anyway to allow someone to try to "predict" the final file name;
better to use the storage APIs always to access the given object.
I find it really disturbing for someone that comes for the first time and
*thinks* that's it's possible (especially when it was possible in 1.0, and
you'll get a lot of references on the web on 'tips' and similar usage) to
access the filenames in a pre_save signal.
The problem is that *if* you don't know that it's impossible now, you'll
try to access instance.attribute.path (which contained the correct path to
the file in Django 1.0) and get a result, but a wrong one! Isn't it
possible to prevent access to the attribute or at least set it to
something that will not be interpreted as "strange"?
--
Ticket URL: <http://code.djangoproject.com/ticket/10788#comment:11>
Django <http://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 post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---