简体   繁体   中英

Where to store media file of Django on production?

So I am learning Django. And I have made some websites with it. Now I am hosting those to Heroku. I am using free Dyno on Heroku . Also, I am using supabase.io database instead of Heroku's because supabase gives more space for the database on the free tier. Now the problem I am facing is with the media files. I can not access them on Heroku since I don't have any place to store them.

I have seen some addons on Heroku for the file storage but to use those I need to provide my credit card information, which I do not have.

But I have seen an object storage option on supabase.io . It gives 1 GB free storage which is more than enough for me now. But I don't know how can I use it with my Django application. That is why I am looking for help. Also if there are any free alternatives to store my media file without credit card information, please feel free to guide me. Since I do not own any card.

There is a community-supported Python library for Supabase that has support for Supabase Storage, which you can try:

https://github.com/supabase-community/supabase-py

see the storage code here:

https://github.com/supabase-community/supabase-py/tree/develop/supabase/lib/storage

I know this might be an old question, but for future reference, you could probably try out django-cloudinary-storage . You can take a look at this answer here .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM