On Mon, Jan 18, 2010 at 12:41 AM, nameless <xsatelli...@gmail.com> wrote:
> Thank you for tips. > Now I want that when an user upload an image ( through forms ), then > it will be saved in media.example.com. > This is the point that I don't understand :-\ > > Does the computer running Django have access to a directory which is served by the media.example.com webserver? If it does, then just set MEDIA_ROOT to point to that directory, and any file uploaded for a FileField will be saved there. Then configure the media.example.com webserver to serve files from that directory and all will be well. You'll end up with: /a/directory/visible/to/www/and/media - contain the files (point MEDIA_ROOT here) www.example.com - Django runs here, will have URLs for any uploaded file pointing to http://media.example.com/ (from MEDIA_URL) media.example.com - Apache or whatever serving up files from the directory above. Obviously if both servers are on the same box then making a directory appear in both places is easy. If not, then you'll have to use some form of network filesystem to get the files between the boxes. Hope this helps, Malcolm--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.