ExAws v1.1.1 ExAws.S3.Upload

Represents an AWS S3 Multipart Upload operation

Examples

"path/to/big/file"
|> S3.Upload.stream_file
|> S3.upload("my-bucket", "path/on/s3")
|> ExAws.request! #=> :done

Summary

Functions

Open a file stream for use in an upload

Upload a chunk for an operation

Types

t()
t() :: %ExAws.S3.Upload{bucket: binary, opts: Keyword.t, path: binary, service: :s3, src: Enumerable.t, upload_id: binary}

Functions

complete(parts, op, config)
initialize(op, config)
stream_file(path, opts \\ [])
stream_file(path :: binary, opts :: [{:chunk_size, pos_integer}]) :: File.Stream.t

Open a file stream for use in an upload.

Chunk size must be at least 5 MiB. Defaults to 5 MiB

upload_chunk!(arg, op, config)
upload_chunk!({binary, pos_integer}, t, ExAws.Config.t) :: {pos_integer, binary}

Upload a chunk for an operation.

The first argument is a tuple with the binary contents of the chunk, and a positive integer index indicating which chunk it is. It will return this index along with the etag response from AWS necessary to complete the multipart upload.