Accessing to images and static files from Django project

Hello everyone,

Sorry if this question is unnecessary but I can’t figure out how to do the following.

I manage to install and deploy successfully a MySQL installation, FastAPI and Django, all of them are up and running.

What I can’t figured out is how to access the image folder from render’s dashboard. Images are show perfectly on Django Admin but since I don’t have access to an FTP or something like that I don’t know how to check it from Render.

Right now I’m using free plans but I will upgrade to paying packages since I was able to upload everything. If maybe this is the problem just let me know.

Thanks everybody!

Hi there,

Our docs show how you can manage static files with Django: https://render.com/docs/deploy-django#static-files.

That being said, any images you upload while the service is running will not stick around unless you use a persistent disk or a database.

Let us know if you have any further.

Regards,
Mike


Render Support Engineer, MT (UTC-7)

Hey Mike,

Thank you very much for your answer.

Yeah I followed the instructions from the link you are sharing, i have all that section up and running. You do understand my problem pointing me to a persistent disk so I can save/have access to all images while the service is running.

Is this something Render does directly? If so, how much does it cost? Could you please point me to the right direction?

Thanks again!

Okay I was just reading this: Disks | Render Docs

It answered most of my questions, I need a paying Instance Type and then add a Disk to it.

Extra question: the mount path for the disk must be the path where the images are being saved on Django? Does it need to match for the images to be saved correctly? What happens if I am saving images in more than one path?

Hi Antonio,

I think you just need to ensure that the application uses the mount path, under which you should be able to use any paths therein. So you should be able to save files under more than one path provided they are all within the mount path.

Hope that helps!

Regards,
Mike


Render Support Engineer, MT (UTC-7)

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