common-core-pkg
Version:
Common package for all the utils
12 lines (11 loc) • 490 B
TypeScript
import { Readable } from "stream";
export declare abstract class S3Service {
private readonly bucket;
private readonly region;
private readonly s3;
constructor(bucket: string, region: string);
uploadObject(key: string, file: Buffer | Uint8Array | Readable, options?: Record<string, any>): Promise<string>;
deleteObject(key: string): Promise<boolean>;
getObject(key: string): Promise<Buffer>;
getSignedUrl(key: string, expiresIn?: number): Promise<string>;
}