Storage Methods
All available methods on postbase.storage — bucket management and object operations.
Storage Methods
Bucket Management
createBucket(name, options?)— Create a new bucketgetBucket(id)— Get bucket metadatalistBuckets()— List all bucketsupdateBucket(id, options)— Update bucket settingsdeleteBucket(id)— Delete an empty bucketemptyBucket(id)— Delete all objects in a bucket
Object Operations
Call postbase.storage.from(bucketName) to get a StorageBucketClient:
upload(path, file, options?)— Upload a filedownload(path)— Download a file as a Blobremove(paths[])— Delete one or more objectslist(prefix?, options?)— List objects in a pathgetPublicUrl(path)— Get the public URL (bucket must be public)createSignedUrl(path, expiresIn)— Create a temporary signed download URLmove(fromPath, toPath)— Move / rename an objectcopy(fromPath, toPath)— Copy an object