Reputation: 3
I use a elastic-beanstalk service on AWS by using Node.js
.
I use a multer
for file upload and uploaded file is saved on webserver.
But when I publish a new version of project file, the files that saved on my webserver are gone.
I want to maintain the file on webserver. just overwrite not rewrite.
so how can I solve this issue?
Thanks for your time!
Upvotes: 0
Views: 601
Reputation: 8415
When working with Elastic Beanstalk (or any auto-scaling environment), ideally you don't want to store anything on the server itself. If a user is uploading a file, save it somewhere off the server.
In AWS, this typically means storing it in S3 - this means that the file doesn't get lost when the project is updated or the server gets terminated.
Upvotes: 1