Expand description
Supabase Storage HTTP client.
This crate provides an HTTP client for the Supabase Storage API.
It communicates with Storage REST endpoints at /storage/v1/....
§Usage
ⓘ
use supabase_client_sdk::prelude::*;
let client = SupabaseClient::new(config).await?;
let storage = client.storage()?;
// Bucket operations
let buckets = storage.list_buckets().await?;
storage.create_bucket("photos", BucketOptions::new().public(true)).await?;
// File operations
let file_api = storage.from("photos");
file_api.upload("photo.png", data, FileOptions::new().content_type("image/png")).await?;
let bytes = file_api.download("photo.png").await?;Re-exports§
pub use bucket_api::StorageBucketApi;pub use client::StorageClient;pub use error::StorageApiErrorResponse;pub use error::StorageError;pub use types::*;
Modules§
Traits§
- Supabase
Client Storage Ext - Extension trait to create a
StorageClientfrom aSupabaseClient.