Nodejs Public files not accessible

I have hosted a Nodejs backend application on render. I am uploading files via my frontend on my backend using multer library on public folder. I am able to access these public folder files for some time but when the server restarts(as per the logs) I am losing all my uploaded files. Any way to solve this issue?

Hi there,

By default, the disk attached to your service is ephemeral, so anything you add to the file system will not survive a restart. You will need to add a disk to your service: https://render.com/docs/disks. Alternatively, you could upload content directly to some sort of cloud storage (AWS S3 for example) and have your application service the content from there.

Regards,

Keith
Render Support, UTC+10 :australia:

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