rejetto forum

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - scaryrawr

Pages: 1
1
Programmers corner / Upload file with ruby programmatically
« on: October 04, 2012, 07:02:07 PM »
So...  I was trying to figure this out all day, and I finally got it to work nicely.

gem install curb

require 'curb'
c = Curl::Easy.new('http://server/uploadpath')
c.multipart_form_post = true
c.http_post(Curl::PostField.file('fileupload1', '/path/to/file'), Curl::PostField.content('upbtn', 'Upload files'))

Since curl has other language bindings it should be similar for those too.

Pages: 1