Cgi#[] and 1.8

i know the 1.8 interface changed so that

cgi[‘k’] no longer returns an Array - sigh.

now, i have a cgi program which is uploading MANY images, all under the same
name, eg the cgi looks like:

Exception:

#<CGI:0x4008e8f4
@output_hidden=nil,
@params={“action”=>[#StringIO:0x401a41b4],
“desc”=>[#StringIO:0x4008c824, #StringIO:0x40088828],
“item”=>[#StringIO:0x4008df6c],
“image”=>[#StringIO:0x40084fc0, #StringIO:0x401aa118,
#StringIO:0x401a986c, #StringIO:0x401a8fc0, #StringIO:0x401a8714,
#StringIO:0x401a7e68, #StringIO:0x401a75bc, #StringIO:0x401a6d10,
#StringIO:0x401a6464, #StringIO:0x401a5bb8, #StringIO:0x401a530c,
#StringIO:0x401a4a60]
},
@cookies={},
@output_cookies=nil,
@multipart=true>

Backtrace:

/usr/local/httpd-2.0.47/htdocs/tom_knox/ebay/index.cgi:82

Content:

nil

so i DO have an array of images… however. cgi[‘image’] seems to return a
StringIO (not array of them) object? anyone know how i get at the array of images?

-a

···

====================================

Ara Howard
NOAA Forecast Systems Laboratory
Information and Technology Services
Data Systems Group
R/FST 325 Broadway
Boulder, CO 80305-3328
Email: ara.t.howard@noaa.gov
Phone: 303-497-7238
Fax: 303-497-7259
~ > ruby -e ‘p(%.\x2d\x29…intern)’
====================================

cgi[‘k’] == cgi.params[‘k’][0]

IIRC,
-austin

···

On Fri, 19 Sep 2003 13:56:51 +0900, ahoward wrote:

cgi[‘k’] no longer returns an Array - sigh.


austin ziegler * austin@halostatue.ca * Toronto, ON, Canada
software designer * pragmatic programmer * 2003.09.19
* 01.33.55