You should possibly use different names like
<div id="addAttachments_wrapper">
<input type="file" name="upload1">
<input type="file" name="upload2">
</div>
and use query_data = web.input(upload={})
On Tue, Sep 13, 2011 at 1:53 AM, Ben Hayden <[email protected]> wrote:
> Hey guys,
> I've got JavaScript for multiple file uploads, and all the file name
> attributes are labeled 'name'.
> <div id="addAttachments_wrapper">
> <input type="file" name="upload">
> <input type="file" name="upload">
> </div>
>
> On the python side, I can't get a list of 'upload' field storage objects
> with both the filename & value.
> With this:
> query_data = web.input(upload=[])
>
> I can get a list with string file upload values, but no filename.
> With this:
> query_data = web.input(upload={})
>
> I only get the last upload FieldStorage with filename & value, so I lose the
> first upload.
> Any ideas on how I can get both uploads & perserve both file names?
>
> --
> 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/-/oJDrri-l1YEJ.
> 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.
>
--
~Devi
--
You received this message because you are subscribed to the Google Groups
"web.py" group.
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.