class Aws::S3::FileUploader
def upload(source, options = {})
-
(void)
-
Options Hash:
(**options)
-
:thread_count
(Integer
) -- -
:progress_callback
(Proc
) -- -
:key
(required, String
) -- The key for the object. -
:bucket
(required, String
) -- The bucket to upload to.
Parameters:
-
source
(String, Pathname, File, Tempfile
) -- The file to upload.
def upload(source, options = {}) Aws::Plugins::UserAgent.metric('S3_TRANSFER') do if File.size(source) >= multipart_threshold MultipartFileUploader.new(@options).upload(source, options) else # remove multipart parameters not supported by put_object options.delete(:thread_count) put_object(source, options) end end end