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


K

Kevin DeValck

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
 
Ad

Advertisements

7

7stud --

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top