#15646: FileField's path attribute lacks 'upload_to' bit.
-------------------------------------------+---------------------------
Reporter: anonymous | Owner: nobody
Status: new | Milestone:
Component: File uploads/storage | Version: 1.2
Keywords: storage system path upload_to | Triage Stage: Unreviewed
Has patch: 0 |
-------------------------------------------+---------------------------
The FileField's .path attribute misses the path given in 'upload_to'.
Example:
In settings.py:
{{{
MEDIA_ROOT = '/somewhere/'
}}}
In some model:
{{{
data = models.FileField(upload_to='files')
}}}
In the view that handles the file upload:
{{{
print data.path
}}}
This prints '/somewhere/filename' but if I am correct it shall print
'/somewhere/files/filename'
Exact Version is 1.2.5(-1) (current version in debian/wheezy)
upload_to='files/' does not remedy this issue.
I sincerely hope that I am not wasting your time.
Thank you.
--
Ticket URL: <http://code.djangoproject.com/ticket/15646>
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.