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

javascript - Laravel datatable invalid JSON response -

java - Exception in thread "main" org.springframework.context.ApplicationContextException: Unable to start embedded container; -

sql server 2008 - My Sql Code Get An Error Of Msg 245, Level 16, State 1, Line 1 Conversion failed when converting the varchar value '8:45 AM' to data type int -