R
Railway14mo ago
Aviz

Upload Files

Good morning, I have 4 gigabytes of image files, my application is connected to Git, and I can't upload the files there. How do I upload them directly to my application's upload folder without going through Git? I also tried through the CLI, but when I run an Indexed Compressed [====================] 100% Failed Failed to upload code with status code 413 Payload Too Large My application is working fine; I just can't get the files into my upload folder.
23 Replies
Percy
Percy14mo ago
Project ID: N/A
Aviz
Aviz14mo ago
N/A
Brody
Brody14mo ago
for media storage you would be much better off using bucket storage like cloudflare r2, or even a purpose built online media storage service like cloudinary
Aviz
Aviz14mo ago
Very grateful for the feedback! The application has already been developed, so I have the 4 gigabytes of files. I've already created the volume, and the code pointing to the volume is working perfectly. Now, I just need to put the 4 gigabytes into the volume. How do I do that? Please help me!
Brody
Brody14mo ago
all file access to the volume has to be done by the service it's attached to, so you can deploy this, upload your files to the volume then mount it's volume to your service, note
By default, the storage location is set to the storage subdirectory in the root of the volume, but by setting a service variable USE_VOLUME_ROOT to 1 you can opt to use the root of the volume as the storage location instead
By default, the storage location is set to the storage subdirectory in the root of the volume, but by setting a service variable USE_VOLUME_ROOT to 1 you can opt to use the root of the volume as the storage location instead
https://railway.app/template/Nan7Bs
Aviz
Aviz14mo ago
"Que maneira elegante de resolver esse problema, vocês são incríveis 🤩🤩🤩🤩🤩🤩🤩, parabéns de verdade! Estarei implementando!" "What an elegant way to solve this problem, you guys are amazing 🤩🤩🤩🤩🤩🤩🤩, congratulations for real! I'll be implementing it!" Do I have to manually include these variables in my application, or does it automatically communicate with my database?
Aviz
Aviz14mo ago
No description
Brody
Brody14mo ago
file browser does not use a postgres database, I'm not sure why you have those variables in that service
Aviz
Aviz14mo ago
appeared automatically "Is it because I created it within my project?" "I thought I should create it inside, not outside of a project."
Brody
Brody14mo ago
correct, either way pay no attention to the uneeded postgres database variables
Aviz
Aviz14mo ago
Should I create it outside?
Brody
Brody14mo ago
no inside is good
Aviz
Aviz14mo ago
https://filebrowser-production-f8d0.up.railway.app/ It doesn't work, am I doing something wrong?
Brody
Brody14mo ago
check the deployment logs
Aviz
Aviz14mo ago
yes, no volume attached, please attach a volume. upon attaching a volume let this service rebuild
No description
Brody
Brody14mo ago
so attach a volume
Aviz
Aviz14mo ago
No description
Brody
Brody14mo ago
attach a volume
Aviz
Aviz14mo ago
I didn't understand why it made an error, investigating
Brody
Brody14mo ago
^
Aviz
Aviz14mo ago
Yes, but since it's inside the project, I would attach it to the volume created within the project. So, I'll need to recreate the volume and my code.
Aviz
Aviz14mo ago
No description
Brody
Brody14mo ago
you can unmount the volume from your gestor service and attach it to the file browser service
Want results from more Discord servers?
Add your server