Skip to content

JS Client library to interact with Supabase Storage

License

Notifications You must be signed in to change notification settings

supabase/storage-js

Repository files navigation

storage-js

JS Client library to interact with Supabase Storage.

Quick Start Guide

Installing the module

npm install @supabase/storage-js

Connecting to the storage backend

import { StorageClient } from '@supabase/storage-js'

const STORAGE_URL = 'https://<project_ref>.supabase.co/storage/v1'
const SERVICE_KEY = '<service_role>' //! service key, not anon key

const storageClient = new StorageClient(STORAGE_URL, {
  apikey: SERVICE_KEY,
  Authorization: `Bearer ${SERVICE_KEY}`,
})

Handling resources