我通过AppEngine将视频上传到Google云端存储。什么是最有效的服务方式? [英] I uploaded a video to Google Cloud Storage via AppEngine. What's the most efficient way to serve it?

查看:131
本文介绍了我通过AppEngine将视频上传到Google云端存储。什么是最有效的服务方式?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

与图像不同,没有像image.get_serving_url()这样的API来提供图像blob。对于图像以外的其他内容,我们是否应该设置一个下载处理程序,并像使用BlobStorage中的对象那样使用send_blob()?

p>您可以 ACL 将对象公开阅读,然后直接从 GCS



作为例如,您可以查看我编写的用于测试从GCS和blobstore提供音频和视频的快速应用程序 - > 音频测试.appspot.com的这个链接使用BlobstoreDownloadHandler提供文件,而链接直接从Google云端存储提供相同文件。


Unlike images, there isn't an API like images.get_serving_url() for serving image blob. For things other than images, should we just set up a download handler and use send_blob() like we would for objects in BlobStorage?

解决方案

You can ACL your object to public-read and then serve it directly from GCS.

As an example you can have a look at a quick app I wrote to test serving audio and video from GCS and blobstore -> audio-test.appspot.com. This link serves the file using a BlobstoreDownloadHandler while this link serves the same file direct from Google Cloud Storage.

这篇关于我通过AppEngine将视频上传到Google云端存储。什么是最有效的服务方式?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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