Files upload
Good afternoon,
I would like to create a small SaaS application and deploy it entirely to railway.
One of the features of the project will be uploading files. I want to host simple Node.js api using Multer package to store files.
Is is possible to deploy this on railway? And are there any ways to backup those files? Because when i push a new commit, it deletes all the uploaded files.
And last question, which of yours plans would you recommend for this type of project, where it will be at least 4 different hosted services? And is there any possibility of a students discount?
Best regards,
Tomáš Folprecht
7 Replies
Project ID:
24437e61-fd4d-449a-8651-aef4112f258c
24437e61-fd4d-449a-8651-aef4112f258c
The storage inside the container is going to be ephemeral. It will get wiped with each new deploy. You can use volumes to persist file storage from deploy to deploy. Or you can utilize an external storage solution for the files such as S3 or R2
https://docs.railway.app/reference/volumes
You can have multiple services inside of each project on your account, this is not a problem. If you are deploying from a monorepo, I would look at this
https://docs.railway.app/deploy/monorepo
And to answer your last question, at this time there is no student discount. Using the Hobby plan will be more than enough to get you started in the development process, but once you start making money with the project, you would need to upgrade to the Pro plan
Thank you very much for answering my questions. You helped me a lot.
and here's an example file upload thingy with multer that stores files on the volume
https://github.com/brody192/multer-file-uploads