Skip to content

Files and account storage

Fresh native apps use the account-r2-v1 File backend. File bytes live in private object storage. App SQLite holds metadata, upload intent and business references. Apps and clients receive no bucket credential.

Each platform account initially shares 10,000,000,000 bytes across its apps. This is 10 GB in decimal units. Creating another app does not increase it. The allowance is separate from the app’s database volume and from backup storage.

Terminal window
bfast storage --json
bfast files list --app my-desk

The dashboard shows the same account allowance and File metadata. The usage response distinguishes charged, ready and reserved bytes. Missing data is unavailable; it does not mean zero usage.

Use the generated client with a current app token. Minidesk accepts a File when creating a ticket:

const ticket = await client.createTicket({}, {
title: 'A small attachment',
description: 'Uploaded with the SDK',
attachment: new File(['Hello'], 'note.txt', { type: 'text/plain' }),
});
if (ticket.attachment) {
const response = await client.downloadFile(ticket.attachment);
console.log(await response.text());
}

uploadFile(file) returns a reusable File reference. uploadFile(file, requestKey) accepts an explicit retry key of 16–128 ASCII letters, digits, hyphens or underscores. After a lost response, reuse the same key, user, filename and bytes. The same upload preserves its File ID. Changed content with that key returns 409.

An input can supply an existing File ID. The app reads canonical metadata and checks ownership; it does not trust caller-supplied size, hash or owner fields. An app administrator can access other users’ files in that app. Another app or account gains no access from sharing the object allowance.

Bound Current value
One file 2 MiB
Account object bytes 10,000,000,000
Concurrent transfer per app 1
Unattached upload lifetime 1 hour

An upload stays temporary until a business transaction or storage.save retains it. The worker cleans expired unattached files in bounded batches. An uncertain provider write remains charged until exact reconciliation; uncertainty does not produce a refund.

Older apps can retain SQLite File storage. That profile has a 64 MiB aggregate limit and 1,000 files per app. Do not apply those aggregate limits to a fresh R2 app or silently migrate an existing profile.

Stopping or deleting an app retains saved files and their byte charge. Customer app deletion is not permanent object purge. There is no public automatic purge, old-generation cleanup or customer restore workflow yet.

Running version-3 backups include independent File bytes and verify hashes. Isolated recovery preserves logical File IDs and writes into a fresh physical generation. Bucket durability alone is not a backup. Full-account capture duration and replacement-host recovery remain unqualified. An app database alone does not contain a complete R2 backup.