在GAE中从BlobStore提供文件 [英] Serving files from BlobStore in GAE

查看:83
本文介绍了在GAE中从BlobStore提供文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想问一下,如果我没有使用处理程序(类处理程序),是否可以从谷歌应用程序引擎中的blobstore下载文件(尤其是zip文件)。我的意思是直接提供服务文件,而不需要下载处理程序类的用法。



有什么想法?

解决方案

没有。 (如果我理解了这个问题)没有直接的URL blobstore项目,所以你不能直接得到他们。 但是,您可以使用您定义的网址少于10行的代码

编辑: send_blob还需要一个save_as参数。尝试 save_as = True 以使用blob上传的文件名作为附件文件名。


I want to ask if I can download files from the blobstore in google app engine (zip files especially) without using the handlers(class handlers). I mean serve files directly without downloadhandler class usage.

Have any idea??

解决方案

No. (if I understand the question properly) There is no direct URL for blobstore items, so you can't get at them directly. However you can serve blobs from URLs that you define with less than 10 lines of code.

EDIT: The send_blob also takes a save_as argument. Try save_as=True to use the blob's uploaded filename as the attachment filename.

这篇关于在GAE中从BlobStore提供文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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