1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
//! 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
//!
//! ```ignore
//! use supabase_client::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 for convenient access
pub use StorageBucketApi;
pub use StorageClient;
pub use ;
pub use *;
use SupabaseClient;
/// Extension trait to create a [`StorageClient`] from a [`SupabaseClient`].
///
/// # Example
/// ```ignore
/// use supabase_client::prelude::*;
/// use supabase_client_storage::SupabaseClientStorageExt;
///
/// let client = SupabaseClient::new(config).await?;
/// let storage = client.storage()?;
/// let buckets = storage.list_buckets().await?;
/// ```