R
Railway•17mo ago
naturedopes

Can't access files saved in volume

Hi, i've set up a volume inside my deployment. Inside of which, uploaded jpg's are saved too (this seems to be working ok). A function in my app, allows users to recall these files. But no matter what file path i try, i can't seem to recall the files from the volume. I'm a fairly novice developer, so i could be missing something with my file navigation line but it's driving me crazy. Whereabouts in the file directory is the volume being placed? Here is my latest deploy 758eca20-0eed-48f7-a5b2-86dd0591ee6f Thanks
10 Replies
Percy
Percy•17mo ago
Project ID: 758eca20-0eed-48f7-a5b2-86dd0591ee6f
Brody
Brody•17mo ago
well where did you mount the volume?
naturedopes
naturedopesOP•17mo ago
I've tried a few combinations, but for simplicity i'm currently trying with /data Can the volume be mounted inside the public folder (named 'views' in my app) where front end files are served from? Not saying this is best practice
Brody
Brody•17mo ago
yes you can, many templates have a similar mount point, mount to /app/views this is completely fine as long as you don't already have a views folder in your project, since all your code gets put into the /app folder out of curiosity, what language are you working with?
naturedopes
naturedopesOP•17mo ago
Ah ok, but would it work if i mounted to something like app/views/uploads? (my public folder is named views). I have a node/express server, using multer to upload the files. Thanks for the response
Brody
Brody•17mo ago
yeah that would work, as long as that upload folder doesnt have any files in it from your repo
naturedopes
naturedopesOP•17mo ago
Great thanks
Brody
Brody•17mo ago
np! let me know how it goes
naturedopes
naturedopesOP•17mo ago
It works!! you sir are a legend. It's probably not much to you, but containerized deployments are a real head spinner for a learning dev like me. Thanks again for your help
Brody
Brody•17mo ago
haha dont worry, containerized deployments still get me every now and then too, we all start somewhere! 🙂 im glad i could help!
Want results from more Discord servers?
Add your server