#13943: the upload_to attribute does not append MEDIA_URL automaticaly
---------------------------------------------------+------------------------
Reporter: [email protected] | Owner: nobody
Status: closed | Milestone:
Component: Database layer (models, ORM) | Version: 1.2
Resolution: invalid | Keywords: FileField,
upload_to, ImageField
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:
`upload_to` is used as described here:
http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.FileField.upload_to
That does not include appending `MEDIA_URL` to the name. Rather,
`MEDIA_ROOT` is prepended to the `upload_to` value. This does work. If you
are having trouble in this area the django-users mailing list or #django
IRC channel would be a better place to ask for guidance, since really the
basics of uploading files are really not broken in 1.2. When describing
your problem it would be best to include all relevant settings
(`MEDIA_ROOT` and `MEDIA_URL`) and more description of what exactly the
problem you are observing is.
--
Ticket URL: <http://code.djangoproject.com/ticket/13943#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.