#10788: Actual name of uploaded file available later than it was in 1.0
---------------------------------------------+------------------------------
          Reporter:  kmtracey                |         Owner:  jacob
            Status:  new                     |     Milestone:  1.1  
         Component:  File uploads/storage    |       Version:  SVN  
        Resolution:                          |      Keywords:       
             Stage:  Design decision needed  |     Has_patch:  0    
        Needs_docs:  0                       |   Needs_tests:  0    
Needs_better_patch:  0                       |  
---------------------------------------------+------------------------------
Comment (by lstep):

 Replying to [comment:8 mitsuhiko]:
 > Replying to [comment:7 anonymous]:
 > > Replying to [comment:6 mitsuhiko]:
 > > > The core no longer depends on that and I stronly suggest designing
 custom upload handlers in a way that they don't depend on the final
 filename of the file on the filesystem. This however is slighty backwards
 incomaptible as it seems so it requires a decision by a main developer.
 > >
 > > It's totally incompatible with every code I could see that needs to
 rename (uploaded) files. To rename the file, you have know its name first,
 but in the current status, this is not possible anymore (especially in
 pre_save() signals).
 > Why would you need to rename a file?  Can't see how this is useful.
 Just set the filename before the file is saved by the model then you don't
 have to rename the file, it would be stored with the correct name.

 Well, not necessarily renaming a file, in fact it's just accessing it. We
 don't have the path to access it. Just look at the example in the original
 django dev thread (http://groups.google.com/group/django-
 developers/browse_thread/thread/ce20f196f5e85296 ).

 As a real use-case (simple) example which is often used, for an uploaded
 image (put in an ImageField), generate a thumbnail for it, using the
 pre_save() signal.

-- 
Ticket URL: <http://code.djangoproject.com/ticket/10788#comment:9>
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 django-updates@googlegroups.com
To unsubscribe from this group, send email to 
django-updates+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to