"Cannot GET" when deploying to Heroku

Asked

Viewed 151 times

0

Hello, has anyone ever been through anything like that that can help me?

When putting my project into operation in Heroku, some features related to "v1/photos" do not work and the console returns me the following message:

Failed to load Resource: the server responded with a status of 404 (Not Found) fotos-controller.js:12 Objectconfig: Objectdata: "Cannot GET /v1/photos "headers: (c)status: 404statusText: "Not Found"proto: Object

Follow the Heroku link: https://bancodeimagens.herokuapp.com/

Link to the github: https://github.com/ThallysonB/Banco-de-Imagens

1 answer

0

Heroku doesn’t accept writing, only reading. In the case of image uploads, it may be saved in a few minutes, but it will be deleted automatically at some point.

The image will only be available to access it if it exists in your project when you are deploying your project.

To solve this, you can direct image upload to a web service, not leave it in your Node.js instance. A good service that saves your images in the cloud is the Cloudinary.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.