#12589: upload_to argument on FileField It is not completely clear in the
documentation
------------------------------------+---------------------------------------
          Reporter:  finngruwier    |         Owner:  nobody
            Status:  closed         |     Milestone:        
         Component:  Documentation  |       Version:  1.1   
        Resolution:  invalid        |      Keywords:        
             Stage:  Unreviewed     |     Has_patch:  0     
        Needs_docs:  0              |   Needs_tests:  0     
Needs_better_patch:  0              |  
------------------------------------+---------------------------------------
Changes (by kmtracey):

  * status:  new => closed
  * needs_better_patch:  => 0
  * resolution:  => invalid
  * needs_tests:  => 0
  * needs_docs:  => 0

Comment:

 The MEDIA_ROOT setting is not ignored if the `upload_to` is a callable.
 The callable `upload_to` is expected to return a local filesystem path
 that will then be appended to MEDIA_ROOT, just like a static `upload_to`.
 (Note in both cases if these values turn out to be absolute paths then
 that absolute path will be used.  This will usually result in a
 !SuspiciousOperation exception since Django won't allow writing to files
 outside the MEDIA_ROOT tree. If, however, the absolute path happens to
 fall inside the MEDIA_ROOT tree then things will work.)

-- 
Ticket URL: <http://code.djangoproject.com/ticket/12589#comment:1>
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.


Reply via email to