upload
Version:
Isomorphic TypeScript file upload library.
8 lines (7 loc) • 475 B
TypeScript
import { UploadOptions, UploadProgressEventListener, UploadResponse } from './Upload';
import FormDataNode from 'form-data';
interface UploadFunctionOptions extends Omit<UploadOptions, 'form' | 'url' | 'withCredentials'> {
onProgress?: UploadProgressEventListener;
}
export declare function upload(url: string, form: Record<string, string | Blob> | FormData | FormDataNode, options?: UploadFunctionOptions, withCredentials?: boolean): Promise<UploadResponse>;
export {};