Files, with rules.
Upload, transform and serve files, with access rules declared in your types. Images, documents and video all go in buckets you declare beside your models.
export type Avatars = Bucket<"avatars", { accessMode: "public" accept: ["image/png", "image/jpeg", "image/webp"] maxSize: "5MB" access: { read: BucketPublic; create: BucketLoggedIn } }> export type Profile = Model<{ id: UUID avatar: Optional<ImageAsset<Avatars>> }>
A bucket is a type.
File uploads
Upload files of any type. Size limits and accepted types are checked against the bucket's settings before anything is stored.
Image transforms
Resize images on request with cover or contain fit, and convert them to WebP, AVIF, PNG or JPEG through URL parameters.
Signed URLs
Make a time-limited link to a private file, with an expiry you choose for each link, up to seven days.
Access in your types
Declare who may read, upload, overwrite and delete: anyone, signed-in users, the uploader or a role. Each rule becomes a row level security policy, so Postgres decides.
Buckets, transforms, limits and where the bytes are kept are in the Storage docs.
Files that follow the rules.
Cloud starts with 2 projects, 500 MB database and 1 GB storage, free and with no card.