Object storage against Supabase Storage.
Provides bucket CRUD plus per-bucket file operations (list, remove, move,
copy, info, exists?, public/signed URLs, upload, download), bucket
lifecycle policies (get-bucket-lifecycle / update-bucket-lifecycle /
delete-bucket-lifecycle), and object versioning (:versioning-status
on bucket create/update, :version-id on download/URL/info ops,
version-targeted remove/move/copy, version listing options on
list-files/list-files-v2). Per-bucket ops take a storage instance
returned by from. Analytics bucket operations live in
supabase.storage.analytics. Vector bucket, index, and vector data
operations live in supabase.storage.vector.
(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")
On the JVM each HTTP operation returns {:status :body :headers} on success
or an anomaly map on failure. On ClojureScript, HTTP operations return a
js/Promise resolving to the same response or anomaly. from and
get-public-url are synchronous on both platforms. Uploads accept strings
or js/Uint8Array; downloads return js/Uint8Array on ClojureScript, and the
:stream response is JVM-only. 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), bucket
lifecycle policies (`get-bucket-lifecycle` / `update-bucket-lifecycle` /
`delete-bucket-lifecycle`), and object versioning (`:versioning-status`
on bucket create/update, `:version-id` on download/URL/info ops,
version-targeted `remove`/`move`/`copy`, version listing options on
`list-files`/`list-files-v2`). Per-bucket ops take a storage instance
returned by `from`. Analytics bucket operations live in
`supabase.storage.analytics`. Vector bucket, index, and vector data
operations live in `supabase.storage.vector`.
## 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")
On the JVM each HTTP operation returns `{:status :body :headers}` on success
or an anomaly map on failure. On ClojureScript, HTTP operations return a
`js/Promise` resolving to the same response or anomaly. `from` and
`get-public-url` are synchronous on both platforms. Uploads accept strings
or `js/Uint8Array`; downloads return `js/Uint8Array` on ClojureScript, and the
`:stream` response is JVM-only. See
https://supabase.com/docs/reference/javascript/storage-apiAnalytics buckets (Iceberg tables) against Supabase Storage.
Provides analytics bucket CRUD (create, list, delete) plus
catalog-info, which returns the connection details needed to point
an Iceberg REST catalog client at a bucket. These are project-level
operations and take the client directly.
Public alpha: this API is part of a public alpha release and may not be available to your account type.
(require '[supabase.core.client :as client]
'[supabase.storage.analytics :as analytics])
(def c (client/make-client "https://abc.supabase.co" "anon-key"))
(analytics/create-bucket c "analytics-data")
(analytics/list-buckets c {:limit 10 :sort-column :created-at
:sort-order :desc})
(analytics/catalog-info c)
HTTP operations return {:status :body :headers} on success or an anomaly
map on failure on the JVM, and a Promise of that value on ClojureScript.
catalog-info is synchronous on both platforms. Endpoints live under
{storage-url}/iceberg.
See https://supabase.com/docs/reference/javascript/storage-analytics-api
Analytics buckets (Iceberg tables) against Supabase Storage.
Provides analytics bucket CRUD (create, list, delete) plus
`catalog-info`, which returns the connection details needed to point
an Iceberg REST catalog client at a bucket. These are project-level
operations and take the client directly.
Public alpha: this API is part of a public alpha release and may not
be available to your account type.
## Example
(require '[supabase.core.client :as client]
'[supabase.storage.analytics :as analytics])
(def c (client/make-client "https://abc.supabase.co" "anon-key"))
(analytics/create-bucket c "analytics-data")
(analytics/list-buckets c {:limit 10 :sort-column :created-at
:sort-order :desc})
(analytics/catalog-info c)
HTTP operations return `{:status :body :headers}` on success or an anomaly
map on failure on the JVM, and a Promise of that value on ClojureScript.
`catalog-info` is synchronous on both platforms. Endpoints live under
`{storage-url}/iceberg`.
See https://supabase.com/docs/reference/javascript/storage-analytics-apiPortable URL and UTF-8 Base64 helpers for Storage.
Portable URL and UTF-8 Base64 helpers for Storage.
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
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
Vector buckets, indexes, and vector data against Supabase Storage.
Provides vector bucket CRUD, per-bucket index operations, and
per-index vector data operations (put, get, list, query, delete).
Index ops take an instance returned by from; vector data ops take an
instance further scoped by index.
(require '[supabase.core.client :as client]
'[supabase.storage.vector :as vector])
(def c (client/make-client "https://abc.supabase.co" "anon-key"))
(vector/create-bucket (vector/from c) "embeddings")
(def b (vector/from c "embeddings"))
(vector/create-index b {:index-name "docs"
:data-type :float32
:dimension 384
:distance-metric :cosine})
(def i (vector/index b "docs"))
(vector/put-vectors i [{:key "doc-1" :data {:float32 [0.1 0.2]}}])
(vector/query-vectors i {:query-vector {:float32 [0.1 0.2]} :top-k 5})
HTTP operations return {:status :body :headers} on success or an anomaly
map on failure on the JVM, and a Promise of that value on ClojureScript.
from and index are synchronous constructors on both platforms. All
endpoints are POSTs under {storage-url}/vector with camelCase JSON bodies.
See https://supabase.com/docs/reference/javascript/storage-vector-api
Vector buckets, indexes, and vector data against Supabase Storage.
Provides vector bucket CRUD, per-bucket index operations, and
per-index vector data operations (put, get, list, query, delete).
Index ops take an instance returned by `from`; vector data ops take an
instance further scoped by `index`.
## Example
(require '[supabase.core.client :as client]
'[supabase.storage.vector :as vector])
(def c (client/make-client "https://abc.supabase.co" "anon-key"))
(vector/create-bucket (vector/from c) "embeddings")
(def b (vector/from c "embeddings"))
(vector/create-index b {:index-name "docs"
:data-type :float32
:dimension 384
:distance-metric :cosine})
(def i (vector/index b "docs"))
(vector/put-vectors i [{:key "doc-1" :data {:float32 [0.1 0.2]}}])
(vector/query-vectors i {:query-vector {:float32 [0.1 0.2]} :top-k 5})
HTTP operations return `{:status :body :headers}` on success or an anomaly
map on failure on the JVM, and a Promise of that value on ClojureScript.
`from` and `index` are synchronous constructors on both platforms. All
endpoints are POSTs under `{storage-url}/vector` with camelCase JSON bodies.
See https://supabase.com/docs/reference/javascript/storage-vector-apicljdoc 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 |