I am using Dojo to upload multiple files to the server at once. It sends a
POST request to my Web.py app, submitting the files under the attribute
name 'uploadedfiles'.
I try to catch and return these files with the following code:
def POST(self):
x = web.input()
return x.uploadedfiles
Works great with one file, but with 2 or more it returns only the last file.
I Read the Docs; says web.input uses a dict-like object, so the behavior
above makes sense.
So reading up on things, I try:
def POST(self):
x = web.input(uploadedfiles=[])
return x.uploadedfiles
Cool! Now it returns a list with both files! But it's just the file
itself. It's not a storage object like it would be if there was just one
file.
My question is:
Is there a way to return a list of storage objects from web.input()
--
You received this message because you are subscribed to the Google Groups
"web.py" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/webpy/-/Gx_soFj_MgQJ.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/webpy?hl=en.