I made a MERN project,there for my backend i use multer for form upload. It work perfectly in my local machine and posted photo save on my nodejs directory but when i deploy it on heroku,photo not save on upload directory please help me i try to solve it from many hours
For further actions, you may consider blocking this person and/or reporting abuse
Top comments (6)
Heroku only gives you an instance to host your app but doesn't give you a file system to write to, that means you can't directly upload files, if you need to make use of the file system for uploading and reading of files you might want to use like Digital Ocean droplets or AWS EC2, the most efficient way for you with Heroku will be to use Cloudinary or AWS S3 buckets, these services are optimised for file handling and delivery too.
I had the same issue. Thanks for replay, really helped me.
Thank you...
You can’t write to disk in Heroku, you will need to use a service like AWS S3 or Cloudinary. I think Heroku must have add-ons for othe similares services to upload images.
Thank you....
I'm using #django using #vscode. The problem is about images are not shown in #heroku while hosting a website. Can you help me........