[lnkForumImage]
TotalShareware - Download Free Software

Confronta i prezzi di migliaia di prodotti.
Asp Forum
 Home | Login | Register | Search 


 

Forums >

comp.lang.ruby

Re: Uploading a file with net/HTTP

Keith Fahlgren

3/23/2007 4:34:00 PM

On 3/23/07, Nicholas Wieland <nicholas.wieland@gmail.com> wrote:
> puts Net::HTTP.post_form(URI.parse('http://example.com/uploa...),
> { 'username' => 'foo', 'password' => 'bar', 'Filedata' => File.new
> ('way_home.wmv', 'r').read + '\r\n' })

Yeah, unfortunately Net::HTTP doesn't provide a pretty way to do file
uploads. Here are some (not pretty) workarounds:
http://kfahlgren.com/blog/2006/11/01/multipart-post-...


HTH,
Keith