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
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
Re: Uploading a file with net/HTTP
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password