class Awscr::S3::FileUploader
- Awscr::S3::FileUploader
- Reference
- Object
Overview
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.
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)
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)
#
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!"))