On Sat, Aug 28, 2010 at 4:56 PM, Kad Kerforn <yves_dufour / mac.com> wrote: > I have a curl request (to upload a file) which is running weel in the > console > > $curl -H "X-TrackerToken: xxxxxxx" -X POST -F > Filedata=@/Developpement/Projects/TESTS/pictures/Glen.gif > http://www.pivotaltracker.com/services/v3/projects/999999/stories/999999/attachments > > I tried to mimic it in my ruby script (1.9.2) > > ---- > ... > attachment = "Filedata=@/Developpement/Projects/TESTS/pictures/Glen.gif" > > uri = > URI.parse("http://www.pivotaltracker.com/services/v3/projects/999999/stories/999999/attachments") > > response = Net::HTTP.start(uri.host, uri.port) do |http| > http.post(uri.path, attachment, {'X-TrackerToken' => xxxxxxx}) > end > > but this doesn't work and gave me an Internal Server Error > > is my http.post wrong ?? http://stanislavvitvitskiy.blogspot.com/2008/12/multipart-post-in-ruby.html