简体   繁体   English

使用Google App Engine将图像/视频上传到Google云存储

[英]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. 但是,答案中的代码是文件将首先上传到Blobstore,因此文件不能超过32MB。

How can I upload the large file to Google Cloud Storage directly? 如何直接将大文件上传到Google云端存储?

I have checked the official document Upload Objects , but I still don't know how to write a form to post a large file. 我已经检查了官方文档Upload Objects ,但我仍然不知道如何写一个表单来发布一个大文件。

easy since 1.7.0 容易从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. 将直接上传到Google存储并返回指向云端存储中上传的blob密钥。

upload_url = blobstore.create_upload_url('/upload', gs_bucket_name='mybucketname') 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. 确实使用blob密钥上传到云存储,但它仍然将上传的文件放在blobstore中。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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