View Source Getting Started

install

Install

The package can be installed by adding ivcu_s3_storage to your list of dependencies in mix.exs:

def deps do
  [
    {:ivcu_s3_storage, "~> 0.1.0"}
  ]
end

define-a-storage

Define a storage

defmodule MyApp.S3Storage do
  use IVCU.Storage.S3, otp_app: :my_app
end

configuration

Configuration

config :my_app, MyApp.S3Storage,
  access_key_id: "<access_key_id>",
  secret_access_key: "<secret_access_key>",
  bucket: "my-bucket",
  region: "eu-central-1",
  # Optional:
  host: "amazon.com",
  scheme: "https://"

add-the-storage-to-your-definition

Add the storage to your definition

defmodule MyApp.Image do
  @behaviour IVCU.Definition

  # ...

  def storage, do: MyApp.S3Storage

  # ...
end