Licence
MIT
Version
0.3.0
Deps
2
Size
21 kB
Vulns
0
Weekly
0
ts-s3
Make "AWS SDK for JavaScript v3" easy to use.
Reference
Usage
import type { S3ClientConfig } from "ts-s3";
import { TsS3 } from "ts-s3";
const config: S3ClientConfig = { region: "us-east-1" };
const tss3 = new TsS3(config);
const response = await tss3.listObjects("bucket")
| method | input | output |
|---|---|---|
| listObjects | bucket: string, prefix?: string, maxKeys?: number | Promise<ListObjectsV2CommandOutput> |
| isExistObject | bucket: string, key: string | Promise<boolean> |
| putObject | bucket: string,key: string,body: string | Readable | Blob | ReadableStream | Uint8Array | Buffer | Promise<PutObjectCommandOutput> |
| getObject | bucket: string, key: string | Promise<GetObjectCommandOutput> |
| getObjectInfo | bucket: string, key: string | Promise<HeadObjectCommandOutput> |
| getObjectText | bucket: string, key: string | Promise<string> |
| generatePresignedUrl | bucket: string, key: string, expiration: number | Promise<string> |
| deleteObject | bucket: string, key: string | Promise<DeleteObjectCommandOutput> |
| deleteObjects | bucket: string,keys: string[] | Promise<DeleteObjectsCommandOutput> |
| copyObject | bucket: string,srcKey: string,dstKey: string | Promise<CopyObjectCommandOutput> |