Home > @hapoosjs/api-buckets > Buckets > putFile
Upload a file to a bucket
Signature:
putFile(bucketName: string, filePath: string, file: Readable | Buffer, options?: PutFileOptions): Promise<void>;
| 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>