I've an app where files are uploaded to differente storages:

Certain files uploaded via de the admin are uploaded to S3 (and served
via a CDN) (using a storage from django-storages).
Other files (user-uploaded files), are saved into into our local storage
(using the default FileField storage). These are served by nginx, since
they're usually only served between 0 and 2 times.

In other words, I have:

    image = ImageField(
        upload_to='media/', height_field='height', width_field='width'
    )

And:

    catalog_photo = ImageField(
        storage=S3BotoStorage(),
    )

I also need to show these files in different templates (and need the
admin to show the properly too!).
If I set MEDIA_URL to point to where I upload the first group, them URLs
for the second are broken, and viceversa.

How can I deal with this? Does the field have anything I can set that I
missed?
Also, how can I avoid this breaking in the admin, where editing the
template would be quite a bit more effort (that I'd like to avoid)?

Thanks,

-- 
Hugo Osvaldo Barrera

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1439335048.1737901.353839121.594E3662%40webmail.messagingengine.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to