English 中文(简体)
Uploading multiple files to blobstore (redux)
原标题:

Yes, I ve seen this question already, but I m finding information that contradicts its accepted answer and Nick Johnson s blog on the GAE docs.

The docs talk about uploading more than one file at the same time - the function to get uploaded files returns a list:

The get_uploads() method returns a list of BlobInfo objects, one for each uploaded file in the request.

But everywhere I ve looked, the going assumption is that only one file a time can be uploaded, and a new upload url needs to be created each time.

Is it even possible to upload more than one file at the same time using HTML5/Flash using Plupload?

最佳回答

Currently, the blobstore service upload URLs only support one file upload per post. In order to upload multiple files, you need to use the pattern documented in my blog posts. In future, we may extend the blobstore API to support more flexible upload URLs, supporting multiple uploaded files in a single request.

Edit: The blobstore now supports multiple file uploads in a single request.

问题回答

Here s how I use the get_uploads() method for more than one file:

blob_info = self.get_uploads()[0]
blob_info2 = self.get_uploads()[1]

Nick Johnson s dropbox service is another example and I hope you find what suits your needs.





相关问题
How to make logging.debug work on Appengine?

I m having a tough time getting the logging on Appengine working. the statement import logging is flagged as an unrecognized import in my PyDev Appengine project. I suspected that this was just an ...

gqlQuery returns object, want list of keys

Is there a way to convert the GqlQuery object to an array of keys, or is there a way to force the query to return an array of keys? For example: items = db.GqlQuery("SELECT __key__ FROM Items") ...

Integrating Google AppEngine with a Thick Client

I want to make a multi-user client-server solution with Java Swing thick client as a front-end and Google AppEngine (Java one) as a back-end. The problem is that GAE provides only web-based forms for ...

sorl.thumbnail : thumbnail is not a valid tag library?

I am trying to install sorl.thumbnail but am getting the following error message: thumbnail is not a valid tag library: Could not load template library from django.templatetags.thumbnail, No module ...

热门标签