Supabase.Storage.FileHandler (supabase_storage v0.4.2)
A low-level API interface for managing objects within a Supabase bucket.
Responsibilities
- File Management: Create, move, copy, and get information about files in a bucket.
- Object Listing: List objects based on certain criteria, like a prefix.
- Object Removal: Delete specific objects or a list of objects.
- URL Management: Generate signed URLs for granting temporary access to objects.
- Content Access: Retrieve the content of an object or stream it.
Usage Warning
This module is meant for internal use or for developers requiring more control over object management in Supabase. In general, users should work with the higher-level Supabase.Storage API when possible, as it may offer better abstractions and safety mechanisms.
Directly interfacing with this module bypasses any additional logic the main API might provide. Use it with caution and ensure you understand its operations.
Summary
Types
@type bucket_id() :: String.t()
@type file_path() :: Path.t()
@type object_path() :: Path.t()
@type opts() :: Supabase.Storage.FileOptions.t()
@type prefix() :: String.t() | nil
@type search_opts() :: Supabase.Storage.SearchOptions.t()
@type token() :: String.t()
@type wildcard() :: String.t()
Functions
@spec copy( Supabase.Client.t(), bucket_id(), object_path(), object_path(), String.t() | nil ) :: Supabase.result(Supabase.Fetcher.Response.t())
@spec create_file( Supabase.Client.t(), bucket_id(), object_path(), file_path(), opts() ) :: Supabase.result(Supabase.Fetcher.Response.t())
@spec create_file_to_url( Supabase.Client.t(), bucket_id(), token(), object_path(), file_path(), opts() ) :: Supabase.result(Supabase.Fetcher.Response.t())
@spec create_signed_url(Supabase.Client.t(), bucket_id(), object_path(), keyword()) :: Supabase.result(Supabase.Fetcher.Response.t())
@spec create_upload_signed_url( Supabase.Client.t(), bucket_id(), object_path(), keyword() ) :: Supabase.result(Supabase.Fetcher.Response.t())
@spec get(Supabase.Client.t(), bucket_id(), object_path(), map() | nil) :: Supabase.result(Supabase.Fetcher.Response.t())
@spec get_info(Supabase.Client.t(), bucket_id(), wildcard()) :: Supabase.result(Supabase.Fetcher.Response.t())
@spec get_lazy(Supabase.Client.t(), bucket_id(), wildcard(), term()) :: Supabase.result(Supabase.Fetcher.Response.t())
@spec get_lazy(Supabase.Client.t(), bucket_id(), wildcard(), term(), on_response) :: Supabase.result(Supabase.Fetcher.Response.t()) when on_response: ({Supabase.Fetcher.status(), Supabase.Fetcher.headers(), binary()} -> Supabase.result(Supabase.Fetcher.Response.t()))
@spec list(Supabase.Client.t(), bucket_id(), prefix(), search_opts()) :: Supabase.result(Supabase.Fetcher.Response.t())
@spec move( Supabase.Client.t(), bucket_id(), object_path(), object_path(), String.t() | nil ) :: Supabase.result(Supabase.Fetcher.Response.t())
@spec remove_list(Supabase.Client.t(), bucket_id(), [object_path()]) :: Supabase.result(Supabase.Fetcher.Response.t())