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
Project ID:
758eca20-0eed-48f7-a5b2-86dd0591ee6f
well where did you mount the volume?
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
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?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
yeah that would work, as long as that upload folder doesnt have any files in it from your repo
Great thanks
np! let me know how it goes
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
haha dont worry, containerized deployments still get me every now and then too, we all start somewhere! 🙂
im glad i could help!