Skip to content

Latest commit

 

History

History
49 lines (37 loc) · 732 Bytes

getting_started.md

File metadata and controls

49 lines (37 loc) · 732 Bytes

Getting Started

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

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

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

defmodule MyApp.Image do
  @behaviour IVCU.Definition

  # ...

  def storage, do: MyApp.S3Storage

  # ...
end