Professional Web Applications Themes

cgi#[] and 1.8 - Ruby

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

  1. #1

    Default 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: [email]ara.t.howardnoaa.gov[/email]
    | Phone: 303-497-7238
    | Fax: 303-497-7259
    | ~ > ruby -e 'p(%.\x2d\x29..intern)'
    ====================================
    ahoward Guest

  2. #2

    Default Re: cgi#[] and 1.8

    On Fri, 19 Sep 2003 13:56:51 +0900, ahoward wrote:
    > cgi['k'] no longer returns an Array - sigh.
    cgi['k'] == cgi.params['k'][0]

    IIRC,
    -austin
    --
    austin ziegler * [email]austinhalostatue.ca[/email] * Toronto, ON, Canada
    software designer * pragmatic programmer * 2003.09.19
    * 01.33.55



    Austin Ziegler Guest

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139