piclist
Version:
Modified PicGo core, A tool for picture uploading
25 lines (24 loc) • 729 B
TypeScript
import { S3Client } from '@aws-sdk/client-s3';
import { IAwsS3PListUserConfig, IImgInfo } from '../../../types';
export interface IUploadResult {
key: string;
url: string;
imgURL: string;
versionId?: string;
eTag?: string;
}
declare function createS3Client(opts: IAwsS3PListUserConfig): S3Client;
interface ICreateUploadTaskOpts {
client: any;
bucketName: string;
path: string;
item: IImgInfo;
acl: string;
urlPrefix?: string;
}
declare function createUploadTask(opts: ICreateUploadTaskOpts): Promise<IUploadResult>;
declare const _default: {
createS3Client: typeof createS3Client;
createUploadTask: typeof createUploadTask;
};
export default _default;