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?