0

I deployed my app to heroku: https://doggos-only.herokuapp.com/

The images on the Dog Images link work locally, but they do not work on the deployed version. The only useful error I'm getting is: cj_eOAaboi.jpg:1 Failed to load resource: the server responded with a status of 404 (Not Found)

My best guess is that it has something to do with the file path, but I'm not sure. I've tried looking around the web for a solution but have been unable to find one. Looking for any help, here is the repo: https://github.com/jpchato/doggos_only_project

I'm deploying from the deploy_branch in my repo.

1 Answer 1

2

That's because media files (Those files uploaded by the user) in heroku are not persistent, that means that after a certain time all the media will be erased.

I strongly suggest you to use a media CDN like cloudinary or amazon s3.

I wrote a post on how to setup a media CDN with cloudinary for free and you can access it right here

Django Tutorial: Set up Media files in Deployment for FREE

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.