Hello, I am facing an issue when I redeploy my website. The images do not appear and I have to re-upload them after each republishing. Even after maintenance on render.com, the images still disappear. I am paying for paid Disk storage and paid hosting, so the problem is not with the disk space or hosting. Could the problem be with the storage path?
Hi there,
Are you saving these images to the mount path on your disk? Note that this is an absolute path, not a relative path.
Regards,
Mike
Render Support Engineer, MT (UTC-6, UTC-7 in Winter)
“Thank you for your clarification , It’s clear to me that there’s an error in the Mount path. How can I fix it? Should I delete the disk?”
Hi there,
What kind of error are you receiving when trying to save files on the disk?
Regards,
Mike
Render Support Engineer, MT (UTC-6, UTC-7 in Winter)
Images are not being stored on the disk. When I set up the disk, I made a mistake with the mount path. Now, when I upload images to the website, they appear without any issues and use the same media root path. However, when I redeploy the application (last commit), the images do not appear.
Hi there,
That’s the entire point of having a disk. If you’re not storing the uploaded images on the disk, they will disappear after each deploy/restart. This is because services use ephemeral (i.e. temporary) storage by default. This behavior is more fully explained in our docs: https://docs.render.com/disks
Regards,
Mike
Render Support Engineer, MT (UTC-6, UTC-7 in Winter)
Thank you very much
I have modified the MEDIA_ROOT setting to match the mount path of my Render disk.
Now the images are saved to disk without problems when deploy/restart
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.