View Source TempelAws (TempelAws v0.1.2)

This module is a service module for tempel to handle file persistence using AWS S3

Link to this section Summary

Link to this section Functions

Link to this function

delete(opts, object_key)

View Source
@spec delete(opts :: map(), object_key :: binary()) :: :ok | {:error, reason :: any()}
@spec init(
  opts :: %{
    aws_access_key: String.t(),
    aws_secret_key: String.t(),
    aws_region: String.t(),
    aws_bucket: String.t()
  }
) :: map()
@spec save(
  file ::
    %{filename: binary(), content_type: binary(), path: binary()}
    | %{filename: binary(), content_type: binary(), iodata: binary()},
  opts :: map()
) :: {:ok, binary()} | {:error, any()}
Link to this function

to_url(opts, object_key)

View Source
@spec to_url(opts :: map(), object_key :: binary()) :: String.t()