class UploadHandler(blobstore_handlers.BlobstoreUploadHandler):
def post(self):
reseller_id = self.request.get('reseller_id')
upload_files = self.request.get('logo_img')
if upload_files:
blob_info = upload_files[0]
key = blob_info.key()
我在线路上遇到错误
key = blob_info.key()
错误:
AttributeError: 'str' object has no attribute 'key
问题是文件上传正确,我可以在 GAE blob 查看器中看到它。我从这里的上传示例中复制了这段代码:
https://developers.google.com/appengine/docs/python/blobstore/overview#Complete_Sample_App
我不知道为什么我没有通过使用 blob_info.key() 获得键值,任何指针都将受到欢迎。