When deploying Django, I think many people are reluctant to use GAE. In that case, I think that many people are using the simple Google Cloud Strage. https://django-storages.readthedocs.io/en/latest/backends/gcloud.html
I made an API that spits out about 50 images in that environment, but it was extremely heavy.
Looking at the url
https://storage.googleapis.com/hogestorage/photos/hoge.png?Expires=1573177689&GoogleAccessId=hogehoge&Signature=XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
Looking at the DB
/photos/hoge.png
......
You resolve the names one by one and manage the authority!
This is heavy.
The public image is the default for the service used this time, so change it.
Make the entire bucket public
GS_DEFAULT_ACL = 'publicRead'
When you do API url
https://storage.googleapis.com/hogestorage/photos/hoge.png
It will be detonation velocity.
Recommended Posts