File storage
Buckets for uploads, images and exports that survive redeploys.
Why buckets#
Files written inside a running app are lost when it is redeployed. Keep uploads, images and exports in a bucket instead.
Create a bucket#
Open Storage → New bucket. A bucket is private by default; a public bucket serves its files to anyone with the link, which suits images on a website. You can change this later.
Storage per team depends on the plan (Free 1 GB, Pro 10 GB, Team 50 GB). Uploads that would go over it are refused; Usage & billing shows how much is used.
Use a bucket from your app#
Connect a bucket to a project and it receives CLOUDVEA_STORAGE_URL and CLOUDVEA_STORAGE_TOKEN:
await fetch(`${process.env.CLOUDVEA_STORAGE_URL}/o/avatars/${userId}.png`, {
method: 'PUT',
headers: { Authorization: `Bearer ${process.env.CLOUDVEA_STORAGE_TOKEN}`, 'Content-Type': 'image/png' },
body: file,
});GET and DELETE use the same address; GET ?prefix= on the bucket URL lists files. Each connection has its own token, which you can revoke.
Manage files#
Browse, upload and delete files in the dashboard. Deleting a bucket deletes all its files; you type the name to confirm.