2 years ago
I have a project in react that weighs 3gb of only multimedia files, images, videos, etc., when I upload it from CLI with railway up it tells me "Failed to upload code. File too large" how can I solve it? I have the 100GB base plan, thank you
6 Replies
2 years ago
I'd suggest uploading the project without the multimedia at first and then attach the multimedia into a volume afterwords
2 years ago
I'd suggest uploading the project without the multimedia at first and then attach the multimedia into a volume afterwords
How could I do that?
2 years ago
You can do this by following these steps:
add brody's Filebrowser template into your service ( right click -> template )
set
USE_VOLUME_ROOTto0open the filebrowser site and upload the contents of your multimedia folder
disconnect the volume from the filebrowser service
attach the volume to your react service on the path that you expect the multimedia to be
To expand on point 5, if your multimedia is stored in /public/media then you'd want to attach the volume to /app/public/media, that way your service will fetch the multimedia from the right place
Essentially what you're doing here is using Filebrowser to upload your multimedia to a volume and then you're connecting this volume to the place where your multimedia is expected to be
a year ago
@dev Thanks a lot for you suggestion. I have a question on that. What if I have already a folder, for this scenario /app/public/media?
Do I have to remove that folder and it's content so the new volume attached will be used?
a year ago
The volume will overwrite the data anyway, but yes I'd say remove it then put it in the volume by following my steps above (if you're having the same problem)
If you need further help then please open your own thread 
