Dear Iuri,
I could make a toy example for you. Create a page in %server-root%/www/test-form.tcl with this code:
ad_page_contract {
} {
upload_file:multiple,trim,optional
upload_file.content-type:trim,multiple,optional
upload_file.tmpfile:tmpfile,multiple,optional
}
set existing {}
foreach f ${upload_file.tmpfile} {
lappend existing [file exists $f]
}
ns_return 200 text/html "$upload_file -- ${upload_file.tmpfile} -- $existing -- ${upload_file.content-type}"
Then from the /ds/shell test it like this:
set files {
{data aaa filename test.html fieldname upload_file}
{data bbb filename test2.txt fieldname upload_file}
}
array set r [util::http::post -url http://137.208.114.98:8000/test-form -files $files]
set r(page)
As you can see, multiple file uploads will make each variable a list you can loop through in respective order.
Hope this helps
Antonio