Upload images/video to google cloud storage using Google App Engine

Posted on

Question :

Upload images/video to google cloud storage using Google App Engine

I have read the question from Sending images to google cloud storage using google app engine.

However, the codes in the answer that the file will upload to Blobstore first, so the file can not be exceeded 32MB.

How can I upload the large file to Google Cloud Storage directly?

I have checked the official document Upload Objects, but I still don’t know how to write a form to post a large file.

Asked By: Jerry

||

Answer #1:

easy since 1.7.0

upload_url = blobstore.create_upload_url('/upload_handler', gs_bucket_name='my_bucket')

Will upload straight to Google Storage and return you blob keys that point to the uploads in Cloud Storage.

Answered By: Stuart Langley

Answer #2:

upload_url = blobstore.create_upload_url(‘/upload’, gs_bucket_name=’mybucketname’)

does get the upload with the blob key to the cloud storage but it still puts the uploaded file in the blobstore as well.

Answered By: Jay

Leave a Reply

Your email address will not be published.