Skip to content

storage.Interface.StorageDriverContract

Sclable CI edited this page Oct 7, 2024 · 7 revisions

@sclable/nestjs-libs / storage / StorageDriverContract

Interface: StorageDriverContract

Methods

createBucket()

createBucket(bucket): Promise<void>

Parameters

bucket: string

Returns

Promise<void>

Defined in

packages/storage/src/contracts/storage-driver.contract.ts:8


deleteObject()

deleteObject(bucket, id): Promise<boolean>

Parameters

bucket: string

id: string

Returns

Promise<boolean>

Defined in

packages/storage/src/contracts/storage-driver.contract.ts:17


getDownloadUrl()

getDownloadUrl(bucket, id, filename): Promise<string>

Parameters

bucket: string

id: string

filename: string

Returns

Promise<string>

Defined in

packages/storage/src/contracts/storage-driver.contract.ts:19


getMetaData()

getMetaData(bucket, id): Promise<null | FileMetaData>

Parameters

bucket: string

id: string

Returns

Promise<null | FileMetaData>

Defined in

packages/storage/src/contracts/storage-driver.contract.ts:18


getObject()

getObject(bucket, id): Promise<Buffer>

Parameters

bucket: string

id: string

Returns

Promise<Buffer>

Defined in

packages/storage/src/contracts/storage-driver.contract.ts:15


getObjectStream()

getObjectStream(bucket, id): Promise<ReadableStream>

Parameters

bucket: string

id: string

Returns

Promise<ReadableStream>

Defined in

packages/storage/src/contracts/storage-driver.contract.ts:16


getUploadUrl()

getUploadUrl(bucket, id, onUploaded): Promise<string>

Parameters

bucket: string

id: string

onUploaded

Returns

Promise<string>

Defined in

packages/storage/src/contracts/storage-driver.contract.ts:21


putObject()

putObject(bucket, id, content, metadata?): Promise<string>

Parameters

bucket: string

id: string

content: Buffer | Readable

metadata?: FileMetaData

Returns

Promise<string>

Defined in

packages/storage/src/contracts/storage-driver.contract.ts:9

Clone this wiki locally