UNPKG

picgo

Version:

A tool for image uploading

21 lines (20 loc) 544 B
import type { IImgInfo, IPicGo } from '../../../types'; export type FileUploadResult = { imgUrl: string; width?: number; height?: number; size?: number; contentType?: string; }; export declare class FileService { private readonly ctx; private readonly client; constructor(ctx: IPicGo); upload(img: IImgInfo): Promise<FileUploadResult>; private getToken; private getFileName; private getImageBuffer; private getContentType; private buildUploadHeaders; private callAuthenticatedStep; }