UNPKG

picgo-plugin-s3

Version:
29 lines (28 loc) 866 B
import { S3Client } from "@aws-sdk/client-s3"; import { IImgInfo } from "picgo"; import { IS3UserConfig } from "./config"; export interface IUploadResult { index: number; key: string; url?: string; versionId?: string; eTag?: string; error?: Error; } declare function createS3Client(opts: IS3UserConfig): S3Client; interface createUploadTaskOpts { client: S3Client; bucketName: string; path: string; item: IImgInfo; index: number; acl: string; } declare function createUploadTask(opts: createUploadTaskOpts): Promise<IUploadResult>; declare function getFileURL(opts: createUploadTaskOpts, eTag: string, versionId: string): Promise<string>; declare const _default: { createS3Client: typeof createS3Client; createUploadTask: typeof createUploadTask; getFileURL: typeof getFileURL; }; export default _default;