Skip to content

Storage

Tested with: Not yet available on Databasezy · describes the launch design

Storage keeps your application’s files (avatars, uploads, exports, images) in buckets next to your databases, with access decided by row-level security policies in your project’s primary database.

  • Buckets belong to a project. A public bucket serves objects to anyone; a private bucket requires a policy or a signed URL for every read and write.
  • Policies are ordinary row-level security policies on storage.objects and storage.buckets in the primary database, so the rules for files and rows live in one place. Without a primary database, buckets support only public reads and secret-key access.
  • Objects are stored in the region that runs the project, under your organisation and project.
  • Signed URLs give time-limited access to a private object; signed upload URLs let a client upload without a session.
SQL: users may manage their own folder in the avatars bucket
create policy "own avatar" on storage.objects for all to authenticated
using (bucket_id = 'avatars' and (storage.foldername(name))[1] = auth.uid()::text)
with check (bucket_id = 'avatars' and (storage.foldername(name))[1] = auth.uid()::text);
Terminal window
curl -X POST "https://<ref>.us-east.databasezy.com:8443/storage/v1/object/avatars/user-1.png" \
-H "apikey: <publishable-key>" \
-H "Authorization: Bearer <publishable-key>" \
-H "Content-Type: image/png" \
--data-binary @user-1.png
  • Resumable uploads with the tus protocol and multipart uploads, so a dropped connection resumes instead of restarting.
  • An S3-compatible endpoint at https://<ref>.us-east.databasezy.com:8443/storage/v1/s3, authenticated with a project secret key, for the AWS CLI and S3 SDKs.

Append width, height, quality and format to an image URL to resize, crop or convert it to WebP or AVIF. Results are cached per project; only origin transformations count toward the meter.

Platform usage prices and the allowance each plan includes per month
Meter Price FreeSoloTeamEnterprise
Object storage Coming soon $0.021 per GB-month 1 GB10 GB100 GBContract
Image transformations Coming soon $5 per 1,000 None1001,000Contract
Platform limits on each plan
Limit FreeSoloTeamEnterprise
Storage buckets Coming soon 5100UnlimitedUnlimited
Largest single upload Coming soon 50 MB500 GB500 GB500 GB