From: Michael Guterl Date: 2006-03-30T12:57:42+09:00 Subject: WWW::Mechanize and file uploading. ------=_Part_8594_9505310.1143691059276 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello all, I am fairly new to Ruby and I am loving every minute of it. I'v= e been doing a lot of reading on Ruby and I really like what I've seen thus far. I am in the process of converting some Perl WWW::Mechanize code to Ruby's WWW::Mechanize. Everything was going smooth until the portion where I have to upload a file to the website. Accessing page.forms[0].file_uploads[0] returns the # object. However, I cannot determine how to set th= e path to the file that I wish to upload (the value of the textbox). I've tried setting @file_data and @file_name to '/Users/michaelguterl/test.txt' through the appropriate accessor method. But each time I try and submit the form the website throws a nasty ASP error. I know it is possible to do what I am trying to accomplish using this approach. I'm just a little lost on the Ruby implementation of WWW::Mechanize and trying to find anything on google is nearly impossible with all the Perl stuff out there. Any help is appreciated. Thanks, Michael Guterl ------=_Part_8594_9505310.1143691059276--