I am trying to figure out a way to upload an image into Google Cloud Storage using Google App Engine.
I have checked:
Sending images to google cloud storage using google app engine
Upload images/video to google cloud storage using Google App Engine
They all show how to do it using the BlobStore API.
When I checked the BlobStore API:https://cloud.google.com/appengine/docs/python/blobstore/
They have a note to use Google Cloud Storage instead. What's the current status of BlobStore and will it be supported in the future?
I see an example for image upload: https://github.com/GoogleCloudPlatform/python-docs-samples/blob/master/appengine/standard/blobstore/main.py using BlobStore API.
Is there an example for Google Cloud Storage using Google App Engine?
Uploading images through App Engine has three problems:
First, it's very inefficient. You are using your App Engine instance hours to simply pass-through data from a user's browser to Google Cloud Storage.
Second, it's slower (again, because you use an intermediary).
Finally, App Engine does not support streaming and all requests are limited to 32MB.
The best option is to upload files directly to Cloud Storage using one of the upload options.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With