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.
Solution:Jump to 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...
19 Replies
Project ID:
0027c618-0d3e-4baf-836f-59bbd7375d1b
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
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
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 )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
Ah I see, thank you!
Ahh I see, that's good to know, thanks so much!
no problem
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!
do you have
USE_VOLUME_ROOT
set to 0
?yes, i did
I try both 1 and 0
fragly gave steps above, what exactly are you stuck on
haha read the instructions in the middle of those two rectanges
I tried. but cannot see any diconnection wording!
did you right click on the volume?
where am I suppose to do the right click? :mildpanic:
on the volume π
https://docs.railway.app/overview/the-basics#volumes
Oooooooooooooooooooooooooo!
Finallyyyyyyyyyyyyyyyyyyyyyyy! I see my files! Many thanks!
no problem!