UNPKG

@uploadx/s3

Version:
17 lines (16 loc) 637 B
import { S3Client, S3ClientConfig } from '@aws-sdk/client-s3'; import { File, MetaStorage, MetaStorageOptions, UploadList } from '@uploadx/core'; export type S3MetaStorageOptions = S3ClientConfig & MetaStorageOptions & { bucket?: string; keyFile?: string; }; export declare class S3MetaStorage<T extends File = File> extends MetaStorage<T> { config: S3MetaStorageOptions; bucket: string; client: S3Client; constructor(config: S3MetaStorageOptions); get(id: string): Promise<T>; delete(id: string): Promise<void>; save(id: string, file: T): Promise<T>; list(prefix: string): Promise<UploadList>; }