Class: Fastlane::S3::Client

Inherits:
Object
  • Object
show all
Defined in:
lib/fastlane/plugin/polidea/helper/s3.rb

Instance Method Summary collapse

Instance Method Details

#upload_file(presigned_url, file) ⇒ Object



7
8
9
10
11
12
13
14
15
16
17
# File 'lib/fastlane/plugin/polidea/helper/s3.rb', line 7

def upload_file(presigned_url, file)
  url = URI.parse(presigned_url)
  Net::HTTP.start(url.host) do |http|
    http.send_request(
      'PUT',
      url.request_uri,
      File.read(file),
      'content-type' => ''
    )
  end
end