Hi,
In my controller the result of request.body.read
is:
=============
--AJAX-----------------------1267183973160
Content-Disposition: form-data; name="1261400603_page_white_word.png"; filename="1261400603_page_white_word.png"
Content-Type: application/octet-stream
thefile
--AJAX-----------------------1267183973160
Content-Disposition: form-data; name="1261400536_page_white_excel.png"; filename="1261400536_page_white_excel.png"
Content-Type: application/octet-stream
thefile
--AJAX-----------------------1267183973160--
=============
It contains n form-data (2 in my example), my goal is to loop through the n form-data and get the data name
, filename
and a file uploaded, in my example I replaced the binary data by thefile
.
here is the content of the params hash
{"action"=>"create", "controller"=>"photos", "1265144945_395.jpg"=>#<File:/var/folders/BT/BTpdsWBkF6myaI-sl3+1NU+++TI/-Tmp-/RackMultipart20100226-273-1un364r-0>}
Cheers