使用 Google App Engine 将图像/视频上传到 Google 云存储 [英] Upload images/video to google cloud storage using Google App Engine

查看:44
本文介绍了使用 Google App Engine 将图像/视频上传到 Google 云存储的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已阅读将图像发送到使用谷歌应用引擎的谷歌云存储.

但是,答案中的代码会先上传到Blobstore,所以文件不能超过32MB.

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

如何将大文件直接上传到 Google Cloud Storage?

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.

推荐答案

easy since 1.7.0

easy since 1.7.0

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

将直接上传到 Google Storage 并返回指向 Cloud Storage 上传内容的 blob 键.

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

这篇关于使用 Google App Engine 将图像/视频上传到 Google 云存储的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆