lib/cloud_convert/process.rb in cloudconvert-ruby-0.1.9 vs lib/cloud_convert/process.rb in cloudconvert-ruby-0.2.0

- old
+ new

@@ -40,30 +40,17 @@ end def convert(opts) raise CloudConvert::InvalidStep if @step == :awaiting_creation url = process_url() - if opts[:file].respond_to?("read") - file_to_upload = opts[:file] - opts.delete(:file) - end + multi = opts[:file].respond_to?("read") response = send_request(http_method: :post, url: url, params: opts, - multi: false) do |response| + multi: multi) do |response| response.parsed_response[:success] = true create_parsed_response(:conversion_response, response.parsed_response) @step = @conversion_response[:step].to_sym - - if(file_to_upload) - send_request(http_method: :post, - url: "#{CloudConvert::PROTOCOL}:#{@conversion_response[:upload][:url]}", - params: { - "file": file_to_upload - }, - multi: true) - end - end return convert_response response end def status