Aws::S3::FileUploader
Inherits Reference / Object
Uploads a file to S3. If the file is 5MB it is uploaded in a single request. If the file is greater than 5MB it is uploaded in parts.
Constructors
new(client : Client, options : Options = Options.new(with_content_types: true))
SourceInstance methods
content_type_header(io : IO)
Sourceupload(bucket : String, object : String, io : IO, headers : Hash(String, String) = Hash(String, String).new)
Upload a file to a bucket. Returns true if successful, otherwise an
Http::ServerError is thrown.
uploader = FileUpload.new(client)
uploader.upload("bucket1", "obj", IO::Memory.new("DATA!"))