class
Awscr::S3::FileUploader
- Awscr::S3::FileUploader
- Reference
- Object
Overview
Uploads a file to S3. If the file is smaller than 5MB it is uploaded in a single request. If the file is 5MB or greater, or if size is unknown, it is uploaded in parts.
Defined in:
awscr-s3/file_uploader.crConstructors
Instance Method Summary
- #content_type_header(io : IO)
-
#upload(bucket : String, object : String, io : IO, headers : Hash(String, String) = Hash(String, String).new, retries : Int32 | Nil = nil)
Upload a file to a bucket.
Constructor Detail
Instance Method Detail
def upload(bucket : String, object : String, io : IO, headers : Hash(String, String) = Hash(String, String).new, retries : Int32 | Nil = nil)
#
Upload a file to a bucket. Returns true if successful, otherwise an exception is thrown.
uploader = FileUploader.new(client)
uploader.upload("bucket1", "obj", IO::Memory.new("DATA!"))