Jerry
Jerry

Reputation: 63

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.

Upvotes: 6

Views: 8535

Answers (2)

Jay
Jay

Reputation: 496

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.

Upvotes: 2

Stuart Langley
Stuart Langley

Reputation: 7054

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.

Upvotes: 13

Related Questions