{"issue":{"state":"open","created_at":"2011-12-14T20:49:57Z","updated_at":"2011-12-15T08:46:14Z","user":{"gravatar_id":"ab860f46f9d8a89f5ddc0a079b240b04","id":4429,"url":"https://api.github.com/users/azisaka","avatar_url":"https://secure.gravatar.com/avatar/ab860f46f9d8a89f5ddc0a079b240b04?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"azisaka"},"comments":2,"body":"Hi,\r\n\r\nI'm trying to upload a file to an API. The file can be sent in a streaming, but the way em-http-request does is not what I need I guess.\r\n\r\nIf I do `EM::HttpRequest.new('http://api.localhost', :connect_timeout => 15*60).post :file => \"/path/to/bigfile.jpg\"`, it sends the file as the body of my request but what I need to do is `EM::HttpRequest.new('http://api.localhost', :connect_timeout => 15*60).post :body => { :file => \"/path/to/bigfile.jpg\", :title => \"Testing\" }`\r\n\r\nBeyond the file as a parameter, I would like to send the title of the file and the description of the file, but when I use the :file option, it ignores the :body. Also, I need to send the file as a parameter so the API can handle it. \r\n\r\nIs it possible to upload files using the streaming in that way?","assignee":null,"id":2558089,"number":159,"pull_request":{"patch_url":null,"html_url":null,"diff_url":null},"labels":[],"title":"Post data using multipart and streaming","html_url":"https://github.com/igrigorik/em-http-request/issues/159","closed_at":null,"milestone":null,"url":"https://api.github.com/repos/igrigorik/em-http-request/issues/159"},"action":"created","comment":{"created_at":"2011-12-15T08:46:13Z","updated_at":"2011-12-15T08:46:13Z","user":{"gravatar_id":"ef82c4ebc4ec50ac941729b349d3b1bf","id":2827,"url":"https://api.github.com/users/prepor","avatar_url":"https://secure.gravatar.com/avatar/ef82c4ebc4ec50ac941729b349d3b1bf?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","login":"prepor"},"body":"Browsers send multipart/form-data parts with content-disposition header for addition fields in case of file-data. em-http can not behave same way?","id":3158387,"url":"https://api.github.com/repos/igrigorik/em-http-request/issues/comments/3158387"}}