From: James Britt Date: 2005-06-23T08:09:57+09:00 Subject: Re: uploading a file via POST with Net::HTTP thomaslockney.12367860@bloglines.com wrote: > I've tried looking all over the place for some example of uploading a file > with Net:HTTP, but have finally given up and must ask for help. > > Maybe this > is obvious or has been answered before (I tried searching the archives, but > the search form didn't seem to work for me). > > Any help or pointers would > be appreciated. I haven't more than glanced at this (my stack keeps growing), but it may be what you are looking for: Ruby Flickr Upload Script (by Bill Stilwell) http://www.deftcode.com/archives/ruby_flickr_upload_script.html "The actual development of the script was fairly easy: ruby�s built in support for option parsing, YAML, and XML made things simple. The only irritating part was the HTTP POST of the image file, which I found is not supported by the ruby�s (otherwise excellent) standard http lib. (In case you think this an unreasonable expectation, perl does this.) A rousing bout of googling lead me to this*, which I used to extract a reasonably generic multipart/form-data helper class." * http://blade.nagaokaut.ac.jp/cgi-bin/scat.rb/ruby/ruby-talk/113774 James -- http://www.ruby-doc.org - The Ruby Documentation Site http://www.rubyxml.com - News, Articles, and Listings for Ruby & XML http://www.rubystuff.com - The Ruby Store for Ruby Stuff http://www.jamesbritt.com - Playing with Better Toys