I'm unable to add images to the images folder on my application. I don't know if Heroku provides storage or it facilitates only API type service! And I'm using Heroku as Server and AWS S3 to server Angular frontend, are ther any issues here?
2020-05-08T06:08:04.453786+00:00 heroku[router]: at=info method=POST path="/api/posts/" host=node-
angular-blog.herokuapp.com request_id=ce5514fd-c51f-4de0-963d-67f3f4c4d38c fwd="117.241.185.221"
dyno=web.1 connect=1ms service=2506ms status=500 bytes=598 protocol=https
2020-05-08T06:08:04.453350+00:00 app[web.1]: Error: ENOENT: no such file or directory, open
'images/post-1-1588918082016.jpg'
I have provided the path to images folder as such:
app.use('/images',express.static(path.join(__dirname,"images")));
This is my folder Structure:

Aucun commentaire:
Enregistrer un commentaire