Uploaded images are deleted after deploy
chikipukibabe
PROOP

5 months ago

Hello Railway Support,

We’re experiencing an issue where, after deploying certain backend changes, our previously uploaded photos get deleted. As a result, the images no longer appear on our website.

Could you please clarify why this happens? Is it related to the way Railway handles storage during redeploys? If so, what is the recommended approach to persist uploaded files (e.g., using volumes or another method)?

We would greatly appreciate your guidance on how to configure our project so that uploaded images are not removed after each deployment.

Thank you in advance for your help.

Best regards,
Abror

Solved$10 Bounty

3 Replies

Railway
BOT

5 months ago

Hey there! We've found the following might help you get unblocked faster:

If you find the answer from one of these, please let us know by solving the thread!


Railway

Hey there! We've found the following might help you get unblocked faster: - [🧵 Lost files after new deploy](https://station.railway.com/questions/lost-files-after-new-deploy-7d8a4bb4) - [🧵 How to Persist multer uploads using Railway’s non-ephemeral storage?](https://station.railway.com/questions/how-to-persist-multer-uploads-using-rail-2db003b2) - [🧵 Template Request: NodeBB](https://station.railway.com/questions/template-request-node-bb-b54455b9) - [🧵 is there anything issue with the build with nodejs project today? ](https://station.railway.com/questions/is-there-anything-issue-with-the-build-w-127a199d) If you find the answer from one of these, please let us know by solving the thread!

chikipukibabe
PROOP

5 months ago

Hello Railway Support,

Thank you for sharing the related links. However, the suggested cases don’t fully match our situation. In our project, we use a Node.js backend with an uploads folder where user images are stored. After each deploy, these images are removed, and as a result they stop displaying on the website.

Could you please provide us with a direct solution for this case? Specifically, we need to understand how to configure persistent storage (or another recommended approach) so that uploaded photos are not deleted after deployment.

We’d appreciate clear guidance tailored to this scenario.

Best regards,
Abror


brody
EMPLOYEE

5 months ago

Hello,

Please store your uploads in a volume for persistent storage:

https://docs.railway.com/reference/volumes

https://docs.railway.com/guides/volumes

Best,
Brody


Status changed to Awaiting User Response Railway 5 months ago


brody
EMPLOYEE

5 months ago

This thread has been marked as public for community involvement, as it does not contain any sensitive or personal information. Any further activity in this thread will be visible to everyone.

Status changed to Open brody 5 months ago


Status changed to Solved chikipukibabe 5 months ago


Loading...