Help with multipart/form-data

rubyists-

i’m pretty confused by this :

** upload.cgi **

#!/usr/local/bin/ruby

puts %Q(Content-Type: text/html\r\n\r\n

)

** put.cgi **

#!/usr/local/bin/ruby
require ‘cgi’

cgi = CGI.new ‘html3’
file = cgi[‘file’][0]

puts %Q(Content-Type: text/html\r\n\r\n
file : #{file.type}


file : #{file.inspect}
)

** which outputs in a browser **

file : String
file : “/home/ahoward/09-16-2002.tsk”

i was under the impression from the pickaxe and discussions on this group, that
cgi[‘file’][0].type should be TempFile?

any help appreciated, i assume i’m doing something really stupid here…

-a

···

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

Ara Howard
NOAA Forecast Systems Laboratory
Information and Technology Services
Data Systems Group
R/FST 325 Broadway
Boulder, CO 80305-3328
Email: ahoward@fsl.noaa.gov
Phone: 303-497-7238
Fax: 303-497-7259
====================================

please ignore this post. i am an idiot.

···

On Wed, 4 Dec 2002, ahoward wrote:

rubyists-

i’m pretty confused by this :

** upload.cgi **

#!/usr/local/bin/ruby

puts %Q(Content-Type: text/html\r\n\r\n

)

** put.cgi **

#!/usr/local/bin/ruby
require ‘cgi’

cgi = CGI.new ‘html3’
file = cgi[‘file’][0]

puts %Q(Content-Type: text/html\r\n\r\n
file : #{file.type}


file : #{file.inspect}
)

** which outputs in a browser **

file : String
file : “/home/ahoward/09-16-2002.tsk”

i was under the impression from the pickaxe and discussions on this group, that
cgi[‘file’][0].type should be TempFile?

any help appreciated, i assume i’m doing something really stupid here…

-a

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

Ara Howard
NOAA Forecast Systems Laboratory
Information and Technology Services
Data Systems Group
R/FST 325 Broadway
Boulder, CO 80305-3328
Email: ahoward@fsl.noaa.gov
Phone: 303-497-7238
Fax: 303-497-7259
====================================