1
我想服务使用Flask保存在blobstore中的大文件。从烧瓶中的GAE blobstore服务blob
对于较小的文件,我可以简单地做:
def download_blob(blob_key):
blob_info = blobstore.get(blob_key)
response = make_response(blob_info.open().read())
response.headers['Content-Type'] = blob_info.content_type
response.headers['Content-Disposition'] = 'attachment; filename="%s"' % blob_info.filename
return response
,但它失败了较大的文件。如何将BlobstoreDownloadHandler并入我的Flask应用程序而无需诉诸webapp2?