Home > @hapoosjs/api-buckets > Buckets > putFile

Buckets.putFile() method

Upload a file to a bucket

Signature:

putFile(bucketName: string, filePath: string, file: Readable | Buffer, options?: PutFileOptions): Promise<void>;

Parameters

Parameter Type Description
bucketName string Bucket name
filePath string File key on the cloud
file Readable | Buffer File content
options PutFileOptions (Optional) Additional settings such as storage class

Returns:

Promise<void>