Persistent storage not working for me

Hello. I successfully deployed my Express app on fly.io. I also created a volume, because on my Express app there is a section for uploading files, and all uploaded files go to /files folder. I followed instructions on fly.io and updated my fly.toml file according to it.

[[mounts]]
source=“files”
destination=“/files”

Problem is, whenever I deploy or restart my app, all files from /files folder get wiped. Can someone assist me? Thanks.

Just as a random thought, are you adding the files to the Express app build inside of the Dockerfile? I think if you have something like:

...
ADD static/files /files
...

Then they won’t actually be persisted to that directory, as the volume isn’t available until the app is actually running. Don’t have a citation handy, so if someone knows better, please feel free to correct me!

Actually I don’t use it that way. I have an uploader script on my app. I upload files when my app is running through my uploader script. After I restart my app, all files from the folder vanish, despite the fact that I already set up a volume.