WebFaction
Community site: login faq

I am working on something at and i'm having problems serving the static files uploaded

The images should be served at something like this:

http://static.DOMAIN/uploads/uploaded/Photo05_2A.jpg

and i have these settings::

MEDIA_ROOT = '/home/callumb/webapps/static/photos'
MEDIA_URL = 'http://static.DOMAIN.co.uk/uploads/'

Also the model has this

imageFile = models.ImageField(upload_to='uploaded')

If i cd into the directory "/home/callumb/webapps/static/photos/uploaded" all of the files are there, how can I fix this? I did have it working at some point, however I'ts stopped working

asked 04 Jul '13, 11:17

callumb
12
accept rate: 0%


Your MEDIA_URL is using "/uploads" as its URL path, but your "static" application is attached to its site using "/" as the URL path. If you move the "static" app to "/uploads", then you should then be able to access your files.

permanent link

answered 04 Jul '13, 14:43

seanf
12.2k41836
accept rate: 37%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×909
×26
×12

question asked: 04 Jul '13, 11:17

question was seen: 1,624 times

last updated: 04 Jul '13, 14:43

WEBFACTION
REACH US
SUPPORT
AFFILIATE PROGRAM
LEGAL
© COPYRIGHT 2003-2019 SWARMA LIMITED - WEBFACTION IS A SERVICE OF SWARMA LIMITED
REGISTERED IN ENGLAND AND WALES 5729350 - VAT REGISTRATION NUMBER 877397162
5TH FLOOR, THE OLD VINYL FACTORY, HAYES, UB3 1HA, UNITED KINGDOM