Forums

Uploading images to django blog posts

Hi,

I've been trying to get my images for my blogs posts to work. I've got them working on my local host. I found a previous topic which mentioned that you have to ensure the MEDIA_ROOT is properly mapped which I have done. Basically when I use the admin panel on my site to make a blog post and add a picture, it maps properly and the picture appears in my files under car_app/static/car_app/img. When I run this on pythonanywere I don't get any errors in the admin panel. I can't find any errors in the error log, but the image doesn't load on my post (the console log on my browser give me a 404 for that image) and when I manually navigate to the above mentioned folder the image is not there. Does anyone know where these are stored? Can I view them in the file browser?

Thanks

What code are you using to set MEDIA_URL and MEDIA_ROOT? And have you set up a mapping on the "Static files" section of the "Web" page to make sure that files from the MEDIA_ROOT directory are served on MEDIA_URL?

If it all looks OK to you, can we take a look at your files? We can see them from our admin interface, but we always ask for permission first.

enter image description here

There's no image there.

Make sure you add media directory in dashboard of media section.