ex_riak_cs v0.1.1 ExRiakCS.MultipartUpload
Multipart upload allows you to upload a single object as a set of parts.
More info at: http://docs.basho.com/riak/cs/2.1.1/references/apis/storage/#multipart-upload
Summary
Functions
Aborts a multipart upload and eventually frees storage consumed by previously uploaded parts and returns {:ok, nil} if request was successful, otherwise returns {:error, {response_code, response_body} }
Completes a multipart upload and assembles previously uploaded parts and returns {:ok, file_etag} if request was successful, otherwise returns {:error, {response_code, response_body} }
Initiates a multipart upload and returns {:ok, upload_id} if request was successful, otherwise returns {:error, {response_code, response_body} }
Lists multipart uploads that have not yet been completed or aborted
Lists the parts that have been uploaded for a specific multipart upload
Generates part upload url with signature parameters
Uploads a part in a multipart upload and returns {:ok, part_etag} if request was successful, otherwise returns {:error, {response_code, response_body} }
Functions
Aborts a multipart upload and eventually frees storage consumed by previously uploaded parts and returns {:ok, nil} if request was successful, otherwise returns {:error, {response_code, response_body} }
Example
{:ok, _} = MultipartUpload.abort_multipart_upload("bucket", "key", "upload_id")
More info at: http://docs.basho.com/riak/cs/2.1.1/references/apis/storage/s3/abort-multipart-upload/
Completes a multipart upload and assembles previously uploaded parts and returns {:ok, file_etag} if request was successful, otherwise returns {:error, {response_code, response_body} }
Example
parts = [{1, "part_etag1"}, {2, "part_etag2"}]
{:ok, etag} = MultipartUpload.complete_multipart_upload("my-bucket", "my-key", "upload_id", parts)
More info at: http://docs.basho.com/riak/cs/2.1.1/references/apis/storage/s3/complete-multipart-upload/
Initiates a multipart upload and returns {:ok, upload_id} if request was successful, otherwise returns {:error, {response_code, response_body} }
Example
{:ok, upload_id} = MultipartUpload.initiate_multipart_upload("my-bucket", "my-key", "audio/mpeg")
More info at: http://docs.basho.com/riak/cs/2.1.1/references/apis/storage/s3/initiate-multipart-upload/
Lists multipart uploads that have not yet been completed or aborted
Example
{:ok, uploads} = MultipartUpload.list_multipart_uploads('bucket')
More info at: http://docs.basho.com/riak/cs/2.1.1/references/apis/storage/s3/list-multipart-uploads/
Lists the parts that have been uploaded for a specific multipart upload
Example
{:ok, parts} = MultipartUpload.list_parts("bucket", "key", "upload_id")
More info at: http://docs.basho.com/riak/cs/2.1.1/references/apis/storage/s3/list-multipart-uploads/
Generates part upload url with signature parameters
Example
url = ExRiakCS.MultipartUpload.signed_part_url(“bucket”, “key”, “upload_id”, 1)
Uploads a part in a multipart upload and returns {:ok, part_etag} if request was successful, otherwise returns {:error, {response_code, response_body} }
Example
{:ok, part_etag} = MultipartUpload.upload_part("my-bucket", "my-key", "upload_id", 1, "data")
More info at: http://docs.basho.com/riak/cs/2.1.1/references/apis/storage/s3/upload-part/