How to keep image that upload from client

Hi , I just use nodejs project and i keep all the uploaded image in folder “assets” , if i re deploy the project the image that was uploaded from client is gone. So i just use persistent disk but i don’t know how to mount the path. Can you guide me? i read the docs but still don’t working

Hi,

When creating a disk, you specify a “mount path”, e.g. /uploads

The mount path is from the root of the filesystem. It is not relative to any folders in your code.

So, to persist uploaded/generated files you would need to update your code to write/read them to just the mount path, not a relative path, in this example it would be just /uploads.

Alan

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.