R
Railwayβ€’9mo ago
linear

How to change file browser volume?

I have a project with frontend, backend and database. I would like to store some files and access them from the backend. For this, I have created a backend service. Now I added the file browser template (https://railway.app/template/Nan7Bs) to my project but, if I understand correctly, that service has it's own volume which it manages the files. That is, if I open the website for the file browser, it gives me the ability to upload/download etc. files to the volume of the file browser. Can I access these files from my backend service (f.e. in Python)? If not, how can I change the file browser to use the volume of my backend service? Project ID: 0027c618-0d3e-4baf-836f-59bbd7375d1b Screenshot of project structure attached.
No description
Solution:
You can, just not at the same time that it's connected to your backend service you can however disconnect the volume from your backend server, you can do this by right clicking on the volume, after that you can mount it to the filebrowser service then after you're done, you can mount it back to your backend service...
Jump to solution
19 Replies
Percy
Percyβ€’9mo ago
Project ID: 0027c618-0d3e-4baf-836f-59bbd7375d1b
Fragly
Fraglyβ€’9mo ago
The only way to view the files of a volume via the Filebrowser template wouild be to mount that volume onto the Filebrowser service, this will of course shut the original service the mount belonged to down currently there's no way to share the contents of a volume between 2 services, although shared volumes are planned I'm pretty sure
linear
linearOPβ€’9mo ago
Thank you for your reply, so it's not possible to view the volume of my backend service using the file browser or something similar? How can I access that volume? If I want to upload files for example
Solution
Fragly
Fraglyβ€’9mo ago
You can, just not at the same time that it's connected to your backend service you can however disconnect the volume from your backend server, you can do this by right clicking on the volume, after that you can mount it to the filebrowser service then after you're done, you can mount it back to your backend service ( make sure the USE_VOLUME_ROOT service variable is set to 1 in the filebrowser service to view all the files in the volume )
Brody
Brodyβ€’9mo ago
fun fact, it's not technically what you're asking for, but you can use the api that the filebrowser service exposes to read and write files on the filebrowser service from your backend service instead of accessing files from the local disk
linear
linearOPβ€’9mo ago
Ah I see, thank you! Ahh I see, that's good to know, thanks so much!
Fragly
Fraglyβ€’9mo ago
no problem
Thompson
Thompsonβ€’4mo ago
Hi, I am new to railway.app. I am running couple wordpress sites. One of the site is having problem and need to access to the config.php. I tried to follow the instruction mentioned by Fragly that "disconnect and connect" to volume but I am still not able to figure out how to use the web file browser to see my file in a WordPress volume correctly. Can somebody tell me how I can view my WordPress file using the file browser please! Many many thanks!
Brody
Brodyβ€’4mo ago
do you have USE_VOLUME_ROOT set to 0 ?
Thompson
Thompsonβ€’4mo ago
yes, i did I try both 1 and 0
Brody
Brodyβ€’4mo ago
fragly gave steps above, what exactly are you stuck on
Thompson
Thompsonβ€’4mo ago
No description
Brody
Brodyβ€’4mo ago
haha read the instructions in the middle of those two rectanges
Thompson
Thompsonβ€’4mo ago
I tried. but cannot see any diconnection wording!
No description
Brody
Brodyβ€’4mo ago
did you right click on the volume?
Thompson
Thompsonβ€’4mo ago
where am I suppose to do the right click? :mildpanic:
Thompson
Thompsonβ€’4mo ago
Oooooooooooooooooooooooooo! Finallyyyyyyyyyyyyyyyyyyyyyyy! I see my files! Many thanks!
Brody
Brodyβ€’4mo ago
no problem!
Want results from more Discord servers?
Add your server