Hopefully a straight forward one, but it’s got the point where i’m going round in circles! I’ve recently set my site up with apache2 / mod wsgi. However sice i’ve set the apache config up. I’ve not been able to upload any image and i’m not sure why. My media config is pointing to the correct place as all of the static images etc on the site are working.
I’ve got it so when i upload an image in the CMS it provides the link. e.g. /media/test/pic.jpg but when i click on the link to test it i’m getting a ‘Not found’ error message. I’ve FTP’d into the server and the image isn’t uploading anywhere.
Here is what I have in my models, for my image field:
image = models.ImageField(blank=True, null=True, upload_to="test")
Media settings:
MEDIA_ROOT = 'media'
MEDIA_URL = '/media/'
I guess the main problem is that the images are just not uploading to any directory i put in.
Anyhow, hope this is enough info to go on.
Thanks…
The MEDIA_ROOT must be absolute path (ie /home/user/media)
Read more about MEDIA_ROOT