View Source ExAws.S3.Upload (ExAws.S3 v2.3.3)

Represents an AWS S3 Multipart Upload operation.

Implements ExAws.Operation.perform/2



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

See ExAws.S3.upload/4 for options

Link to this section Summary

Link to this section Types

@type t() :: %ExAws.S3.Upload{
  bucket: String.t(),
  opts: Keyword.t(),
  path: String.t(),
  service: :s3,
  src: Enumerable.t(),
  upload_id: String.t() | nil

Link to this section Functions

Link to this function

complete(parts, op, config)

View Source
Link to this function

stream_file(path, opts \\ [])

View Source
@spec stream_file(path :: binary(), opts :: [{:chunk_size, pos_integer()}]) ::

Open a file stream for use in an upload.

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

Link to this function

upload_chunk!(arg, op, config)

View Source
@spec 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.

Link to this function

upload_chunk(arg, op, config)

View Source
@spec upload_chunk({binary(), pos_integer()}, t(), ExAws.Config.t()) ::
  {pos_integer(), binary()} | {:error, term()}