file too large

davidhernandezalt
HOBBY

a year 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

davidhernandezalt
HOBBY

a year ago

xd

Attachments


a year ago

I'd suggest uploading the project without the multimedia at first and then attach the multimedia into a volume afterwords


davidhernandezalt
HOBBY

a year 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?


a year ago

You can do this by following these steps:

  1. add brody's Filebrowser template into your service ( right click -> template )

  2. set USE_VOLUME_ROOT to 0

  3. open the filebrowser site and upload the contents of your multimedia folder

  4. disconnect the volume from the filebrowser service

  5. 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


p4vlos
HOBBY

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


file too large - Railway Help Station