Home > @hapoosjs/aws-buckets > AWSBuckets > 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>
AWS Storage classes: STANDARD | REDUCED_REDUNDANCY | STANDARD_IA | ONEZONE_IA | INTELLIGENT_TIERING | GLACIER | DEEP_ARCHIVE | OUTPOSTS | GLACIER_IR