如何设置关于BlobStore的密钥'blob-key'?

时间:2010-04-11 09:49:59

标签: python google-app-engine uploadify blobstore

我尝试使用jquery插件“uploadify”将多个文件上传到Google App-Engine中的My App,然后使用blobstore保存,但失败了。我将代码跟踪到get_uploads,似乎field.type_options为空,当然没有'blob-key'。密钥'blob-key'来自哪里?

像这样的代码:

def upload(request):
   for blob in blogstorehelper.get_uploads(request, 'Filedata'):
       file = File()
       file.blobref = blob
       file.save()
   return ……

但是,blogstorehelper.get_uploads(请求,'Filedata')始终为空。实际上,请求已包含上传的文件(我打印请求)。我调试了blogstorehelper.get_uploads,发现field.type_options是空的。谁能告诉我为什么?谢谢!这是关于get_uploads的来源:http://appengine-cookbook.appspot.com/recipe/blobstore-get_uploads-helper-function-for-django-request/?id=ahJhcHBlbmdpbmUtY29va2Jvb2tyjwELEgtSZWNpcGVJbmRleCI4YWhKaGNIQmxibWRwYm1VdFkyOXZhMkp2YjJ0eUZBc1NDRU5oZEdWbmIzSjVJZ1pFYW1GdVoyOE0MCxIGUmVjaXBlIjphaEpoY0hCbGJtZHBibVV0WTI5dmEySnZiMnR5RkFzU0NFTmhkR1ZuYjNKNUlnWkVhbUZ1WjI4TTIxDA

0 个答案:

没有答案