thanks for your help, but i still need filename-value pair, is there a
easy way to do that?

On Wed, May 7, 2008 at 10:27 PM, Anand Chitipothu <[EMAIL PROTECTED]> wrote:
>
> On Wed, May 7, 2008 at 7:21 PM, Matt <[EMAIL PROTECTED]> wrote:
>>
>>  i dont know how current version of web.py to handle multi files
>>  upload, for example, user may upload three, or four ,or even more
>>  files, and i have no idea how many files they will upload. the coming
>>  files may post by file_1, file_2, ... file_n, if i want handle this, i
>>  have to do much more code. so will web.py support this for a simple
>>  way ? likes files = web.input('files_\d+') or other easy way.
>
> It will be simple, If you not worried about finding the names of the
> submitted files.
> Here is the code assuming that names of file inputs as like file_*.
>
> i = web.input()
> files = [i[k] for k in i if k.startswith("file_")
> # files is a list containing data of each file
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to