Skip to content

Elixir client to interact with Supabase Storage

License

fabricedge/storage-ex

 
 

Repository files navigation

Supabase Storage

Storage implementation for the Supabase Potion SDK in Elixir.

Installation

def deps do
  [
    {:supabase_potion, "~> 0.6"},
    {:supabase_storage, "~> 0.4.2"} # x-release-please-version
  ]
end

Usage

Firstly you need to initialize your Supabase client(s) as can be found on the Supabase Potion documentation

Now you can pass the Client to the Supabase.Storage functions:

iex> Supabase.Storage.list_buckets(%Supabase.Client{})

Upload File inside bucket

Secret Key : https://supabase.com/dashboard/project/[YOUR-PROJECT]/settings/api-keys/new image URL: https://supabase.com/dashboard/project/[YOUR-PROJECT]/settings/api

iex> {:ok, client} = Myapp.Supabase.Client.get_client()
iex> storage= Supabase.Storage.from(client, "yourbucket")
iex> Supabase.Storage.File.upload(storage, "/file/path/local/file.jpg", "/folder/images/file.jpg")

About

Elixir client to interact with Supabase Storage

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Elixir 98.4%
  • Nix 1.2%
  • Shell 0.4%