Hi!!!!
Im having trouble using Typhoeus v0.5 with an api that recieves a file upload.
According to the Getting Started guide:
:body => {
:title => "test post", :content => "this is my test",
:file => File.open("thesis.txt","r")
}
)
I did basically the same, using the absolute path for the file. but If I check the logs on the service I see this:
Parameters: {"avatar"=>{"file"=>"401804_4158820532594_47659601_n.jpgimage/jpeg/home/luis/Workspace/Padma/Padma/public/persona/foto/1769562/401804_4158820532594_47659601_n.jpg"}}
Notice how the service recieves the "file" param with something that doesnt look right...
If I upload manually from the UI the upload works and the parameters are like this:
Parameters: {"avatar"=>{"file"=>#<ActionDispatch::Http::UploadedFile:0xd8c3ff4 @original_filename="401804_4158820532594_47659601_n.jpg", @content_type="image/jpeg", @headers="Content-Disposition: form-data; name=\"avatar[file]\"; filename=\"401804_4158820532594_47659601_n.jpg\"\r\nContent-Type: image/jpeg\r\n", @tempfile=#<File:/tmp/RackMultipart20121104-3689-kv3j14>>}}
Help!! :D