alixir_oss v0.1.1 Alixir.OSS View Source
Alixir.OSS
enables puting and deleting objects for Aliyun
OSS.
Examples
Alixir.OSS.put_object(args...)
|> Alixir.request()
Alixir.OSS.delete_objects(args...)
|> Alixir.request()
See put_object/4
and delete_object/4
for more details.
Link to this section Summary
Functions
Delete object from OSS. Return an Alixir.OSS.Operation
struct which
could be passed to Alixir.request
to perform the
request
Put object to OSS. Return an Alixir.OSS.Operation
struct which
could be passed to Alixir.request
to perform the
request
Link to this section Functions
Delete object from OSS. Return an Alixir.OSS.Operation
struct which
could be passed to Alixir.request
to perform the
request.
Example
iex> operation = Alixir.OSS.delete_object(“foo_bucket”, “foo/bar.jpg”) …> with %Alixir.OSS.Operation{http_method: :delete, bucket: “foo_bucket”, object_key: “foo/bar.jpg”, …> oss_headers: oss_headers} when is_list(oss_headers) <- operation, do: true true
Put object to OSS. Return an Alixir.OSS.Operation
struct which
could be passed to Alixir.request
to perform the
request.
Example
iex> operation = Alixir.OSS.put_object(“foo_bucket”, “foo/bar.jpg”, File.stream!(“test/data/bar.jpg”), “X-OSS-Object-Acl”: “public-read”) …> with %Alixir.OSS.Operation{http_method: :put, bucket: “foo_bucket”, object_key: “foo/bar.jpg”, …> file: %File.Stream{path: “test/data/bar.jpg”}, oss_headers: oss_headers} when is_list(oss_headers) <- operation, do: true true