ruby on rails - Getting Connection reset by peer - SSL_connect error while uploding file to another app -


currently have rails application. have implement functionality upload file application.

the given application uses 3-legged oauth security. have following architecture

i have able create fileid. while making put call (uploading file) getting errno::econnreset: connection reset peer - ssl_connect error.

so how can upload file in chunk. here sample code uploading file.

file_data = file.open("/home/test/downloads/rechargereceipt.pdf") {|io| io.read} file_data_64 = base64.encode64(file_data)  access_token.put("/org/files/3156906966",   { 'content' => file_data_64 }.to_json,   {     'accept' => 'application/vnd.axiom.v3+json',      'content-type' => 'application/octet-stream'    } ) 

i using rails 4.

there issue while passing body parameters.

data = file.read(params[:file].path) access_token.put("/org/files/#{file_id}",         data,         {           'accept' => johndeere::accept,           'content-type' => content_type         }       ) 

Comments

Popular posts from this blog

wireshark - USB mapping with python -

c++ - nodejs socket.io closes connection before upgrading to websocket -

Deploying Qt Application on Android is really slow? -