Skip to main content

Storage

Manage a project's buckets and files. You act as yourself: the owner, project developers and admins manage everything; auditors read. In app code use tc.storage.

Paths are written BUCKET/PATH, for example receipts/2026/lunch.pdf.

tc storage buckets​

Buckets, usage and quota. tc storage with no subcommand does the same.

tc storage buckets [--project NAME] [--json]

Output

expenses: 18.4 MB of 5 GB used, 42 file(s); files up to 50 MB
receipts private 40 file(s) 17.9 MB read: approver
exports app-public 2 file(s) 512.0 KB

JSON: { buckets, usage: { usedBytes, quotaBytes, maxFileBytes, objects }, appUrl, canManage, … }.

tc storage buckets create​

Creates a bucket, or updates it if it exists.

tc storage buckets create NAME [--visibility private|app-public] [--read-role ROLE]...
Argument / flagDescription
NAME3–63 characters: lowercase letters, digits, dashes
--visibilityprivate (default) or app-public
--read-role ROLEPrivate buckets: an app role that reads every file. Repeat it.
tc storage buckets create receipts --read-role approver

Errors: INVALID_BUCKET, INVALID_VISIBILITY (there is no internet-public option), INVALID_ROLE.

tc storage ls​

Files and folders under a folder.

tc storage ls BUCKET[/FOLDER] [--json]

Output

DIR receipts/2026/
82.1 KB 2026-11-02 14:10 Kwame Mensah 2026/lunch.pdf

tc storage put​

Uploads a file (streamed). You become its owner.

tc storage put FILE BUCKET/PATH [--upsert] [--content-type TYPE]
Argument / flagDescription
FILELocal file
BUCKET/PATHDestination. If PATH is empty or ends in /, the file name is appended.
--upsertReplace an existing file
--content-type TYPEDefault: guessed from the file name
Uploaded receipts/templates/expense-policy.pdf (204.8 KB, application/pdf)

Errors: STORAGE_EXISTS (use --upsert), STORAGE_FILE_TOO_LARGE, STORAGE_QUOTA_EXCEEDED, STORAGE_TYPE_NOT_ALLOWED. The fix is printed on the next line.

tc storage get​

Downloads a file.

tc storage get BUCKET/PATH [OUT]
ArgumentDescription
OUTWhere to save. Default: the file name in the current folder.

JSON: { bucket, path, out, bytes, contentType }.

tc storage rm​

Deletes one or more files.

tc storage rm BUCKET/PATH...
Deleted receipts/2026/lunch.pdf
Not deleted receipts/2026/taxi.pdf: STORAGE_NOT_OWNER …

tc storage sign​

Prints a signed link on the app's origin. It still opens behind company sign-in.

tc storage sign BUCKET/PATH [--expires SECONDS]
FlagDescription
--expires SECONDSLifetime. Default 3600, up to 7 days.
https://expenses.apps.contoso.com/_tc/storage/v1/object/sign/receipts/2026/lunch.pdf?token=…
(expires 2026-11-15T15:10:00.000Z; opens behind company sign-in)

JSON: { signedUrl, path, expiresAt, url }.

Was this page helpful?