Skip to content

BeechCMS


BeechCMS / @beechcms/core / BeechBucket

Interface: BeechBucket ​

Methods ​

delete() ​

delete(key): Promise<void>

Parameters ​

key ​

string

Returns ​

Promise<void>


get() ​

get(key): Promise<GetBucketResult | null>

Parameters ​

key ​

string

Returns ​

Promise<GetBucketResult | null>


getTotalSize() ​

getTotalSize(): Promise<number>

Returns ​

Promise<number>


getUrl() ​

getUrl(key): string

Parameters ​

key ​

string

Returns ​

string


head(key): Promise<{ contentType?: string; metadata?: Record<string, string>; size: number; } | null>

Parameters ​

key ​

string

Returns ​

Promise<{ contentType?: string; metadata?: Record<string, string>; size: number; } | null>


list() ​

list(options?): Promise<{ cursor?: string; objects: object[]; }>

Parameters ​

options? ​
cursor? ​

string

limit? ​

number

prefix? ​

string

Returns ​

Promise<{ cursor?: string; objects: object[]; }>


presignGet() ​

presignGet(key, options): Promise<string>

Generates a signed URL for direct read (GET).

Parameters ​

key ​

string

options ​

PresignOptions

Returns ​

Promise<string>


presignPut() ​

presignPut(key, options): Promise<string>

Generates a signed URL for direct upload (PUT).

Parameters ​

key ​

string

options ​

PresignOptions

Returns ​

Promise<string>


put() ​

put(key, body, options?): Promise<void>

Parameters ​

key ​

string

body ​

ArrayBuffer | Uint8Array<ArrayBufferLike> | ReadableStream<any>

options? ​

PutBucketOptions

Returns ​

Promise<void>