export declare class UploadError extends Error { status: number; method: string; url: string; } export type UploadOptions = { name?: string; file: Blob; /** * @deprecated use sendRaw instead */ sendFile?: boolean; sendRaw?: boolean; url: string; method?: string; data?: any; headers?: { [x: string]: string; }; withCredentials?: boolean; onSuccess: (body: any, xhr: XMLHttpRequest) => void; onError: (e: any, body?: any) => void; onProgress: (e: ProgressEvent) => void; }; export declare function getError(option: UploadOptions, xhr: XMLHttpRequest): Error; export declare function getBody(xhr: XMLHttpRequest): string | object; export declare function upload(option: UploadOptions): XMLHttpRequest;