File storage
Serve your application files — avatars, documents, exports — from the project storage API, with the same API key as everything else.
Buckets
A bucket is a named container. Choose its visibility: private, where every read goes through an authenticated request, or public, where objects are served from a direct URL.
Upload and browse files
The console lists the project buckets and supports drag-and-drop upload, preview and deletion. Your applications use the same API, under /storage/v1/.
JavaScript
import { createClient } from '@kuunda/kuunda-js';
const kuunda = createClient(process.env.NEXT_PUBLIC_KUUNDA_URL!, process.env.NEXT_PUBLIC_KUUNDA_ANON_KEY!);
// Lister
const { data: fichiers } = await kuunda.storage.from('avatars').list();
// Envoyer : la session de l'utilisateur accompagne la requête
const { data: envoye, error } = await kuunda.storage
.from('avatars')
.upload('utilisateurs/1/photo.png', fichier);The SDK reuses the client API key and session token, exactly like the tables.
Control access
Objects are not covered by the table security policies. Access is decided by the calling API key and the bucket visibility — hence two rules:
- Never put the service key in a browser or a mobile app: it bypasses access restrictions.
- For a private file meant for one user, go through your backend, which checks authorisation and then returns the content.
Migration
An import from another provider recreates your buckets and then transfers the files. Start with data, then files: an orphaned object is easier to replay than a missing table.