upload-js
Version:
File Upload Library — Upload.js gives developers AJAX multipart file uploading via XHR 🚀 Comes with Cloud Storage 🌐
15 lines (14 loc) • 396 B
TypeScript
import { JsonObject, FilePathDefinition } from "@upload-io/upload-api-client-upload-js";
export interface UploadParams {
metadata?: JsonObject;
onBegin?: (params: {
cancel: () => void;
}) => void;
onProgress?: (status: {
bytesSent: number;
bytesTotal: number;
progress: number;
}) => void;
path?: FilePathDefinition;
tags?: string[];
}