tcb storage
tcb storage ships two command sets: PG mode works with buckets and objects in the storage schema, classic mode works with files under the cloudPath path.
Command index
PG mode
| Command | Purpose |
|---|---|
tcb storage buckets list | List buckets |
tcb storage policies list | View RLS policies of the storage schema |
tcb storage objects list | List objects |
tcb storage objects stat | Query object metadata |
tcb storage objects upload | Upload an object |
tcb storage objects download | Download an object |
tcb storage objects cp | Copy an object |
tcb storage objects mv | Move an object |
tcb storage objects sign | Generate a temporary download or upload URL |
tcb storage objects rm | Delete objects |
PG mode storage commands have been available since @cloudbase/cli@3.4.0 and require a PG mode environment.
Classic mode
| Command | Purpose |
|---|---|
tcb storage list | List files |
tcb storage search | Search files |
tcb storage upload | Upload a file or directory |
tcb storage download | Download a file or directory |
tcb storage cp | Copy or move a file |
tcb storage rm | Delete files |
tcb storage url | Get an access URL |
tcb storage detail | Get file information |
tcb storage rules get | Get access rules |
tcb storage rules update | Update access rules |
Notes
- The two command sets do not overlap, pick the page that matches the environment mode
- PG mode object commands need
-b <bucketId>, or theTCB_BUCKET_IDenvironment variable - In classic mode a path starting with
/means the root directory, anything else is a relative path - PG mode controls access with RLS policies, classic mode with
tcb storage rules; resource-level permissions usetcb permission
Deprecated
| Command | Replacement |
|---|---|
tcb storage:upload | tcb storage upload |
tcb storage:download | tcb storage download |
tcb storage:delete | tcb storage rm |
tcb storage:list | tcb storage list |
tcb storage:url | tcb storage url |
tcb storage:detail | tcb storage detail |
tcb storage get-acl | tcb permission |
tcb storage set-acl | tcb permission |
tcb storage:get-acl | tcb permission |
tcb storage:set-acl | tcb permission |