from google.appengine.ext import blobstore
upload_url = blobstore.create_upload_url('/upload')
uplaod_url是一个独特的网址,如何在处理程序中获取它?
from google.appengine.ext.webapp import blobstore_handlers
class UploadHandler(blobstore_handlers.BlobstoreUploadHandler):
def post(self):
upload_files = self.get_uploads('file')
blob_info = upload_files[0]
self.redirect('/serve/%s' % blob_info.key())
答案 0 :(得分:0)
你不希望它在post处理程序中。在文件上传后调用,但上传本身由App Engine内部处理。