Object storage against Supabase Storage.
Provides bucket CRUD plus per-bucket file operations (list, remove, move,
copy, info, exists?, public/signed URLs, upload, download). Per-bucket
ops take a storage instance returned by from.
(require '[supabase.core.client :as client]
'[supabase.storage :as storage])
(def c (client/make-client "https://abc.supabase.co" "anon-key"))
(storage/list-buckets c)
(storage/create-bucket c "avatars" {:public true})
(def s (storage/from c "avatars"))
(storage/upload s "profile.png" my-bytes
{:content-type "image/png" :upsert true})
(storage/download s "profile.png")
(storage/get-public-url s "profile.png")
Each function returns {:status :body :headers} on success or an anomaly
map on failure. See https://supabase.com/docs/reference/javascript/storage-api
Object storage against Supabase Storage.
Provides bucket CRUD plus per-bucket file operations (list, remove, move,
copy, info, exists?, public/signed URLs, upload, download). Per-bucket
ops take a storage instance returned by `from`.
## Example
(require '[supabase.core.client :as client]
'[supabase.storage :as storage])
(def c (client/make-client "https://abc.supabase.co" "anon-key"))
(storage/list-buckets c)
(storage/create-bucket c "avatars" {:public true})
(def s (storage/from c "avatars"))
(storage/upload s "profile.png" my-bytes
{:content-type "image/png" :upsert true})
(storage/download s "profile.png")
(storage/get-public-url s "profile.png")
Each function returns `{:status :body :headers}` on success or an anomaly
map on failure. See https://supabase.com/docs/reference/javascript/storage-apiMalli schemas for Supabase Storage operation inputs.
Schemas validate caller arguments only — response bodies are returned as plain JSON-decoded maps. See https://supabase.com/docs/reference/javascript/storage-createbucket
Malli schemas for Supabase Storage operation inputs. Schemas validate caller arguments only — response bodies are returned as plain JSON-decoded maps. See https://supabase.com/docs/reference/javascript/storage-createbucket
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |