Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.ruby > #4670 > unrolled thread

Read data from enctype="multipart/form-data" form

Started byKevin DeValck <kevin_de_valck@hotmail.com>
First post2011-05-17 06:41 -0500
Last post2011-05-17 13:14 -0500
Articles 2 — 2 participants

Back to article view | Back to comp.lang.ruby


Contents

  Read data from enctype="multipart/form-data" form Kevin DeValck <kevin_de_valck@hotmail.com> - 2011-05-17 06:41 -0500
    Re: Read data from enctype="multipart/form-data" form 7stud -- <bbxx789_05ss@yahoo.com> - 2011-05-17 13:14 -0500

#4670 — Read data from enctype="multipart/form-data" form

FromKevin DeValck <kevin_de_valck@hotmail.com>
Date2011-05-17 06:41 -0500
SubjectRead data from enctype="multipart/form-data" form
Message-ID<488bff8c1be56ed2c2ba653589eaa42e@ruby-forum.com>
Hi,

i'm trying to upload a picture on a ruby server. I succeed in it when i
make a form with only the abbility to upload a file.
But the problem is when i try to make a form with additional information
like a textarea.
So my question is, how can i retreive the parameters from a from with
enctype="multipart/form-data".

In a normal form i can do like this to retreive the info: numb =
@cgi["numb"]
But with enctype="multipart/form-data"  it says that numb is stringio or
a file. So how can i get that original data that was in it?

Thanks

-- 
Posted via http://www.ruby-forum.com/.

[toc] | [next] | [standalone]


#4683

From7stud -- <bbxx789_05ss@yahoo.com>
Date2011-05-17 13:14 -0500
Message-ID<63e1f9257c6a62814cfbedf9a23be052@ruby-forum.com>
In reply to#4670
Kevin DeValck wrote in post #999235:

> But with enctype="multipart/form-data"  it says that numb is stringio or
> a file. So how can i get that original data that was in it?
>

How would you get the contents of a file?

contents = numb.read

-- 
Posted via http://www.ruby-forum.com/.

[toc] | [prev] | [standalone]


Back to top | Article view | comp.lang.ruby


csiph-web