FileUploadClient - client to simplify upload process for AppCenter needs using Microsoft file upload service
npm run build
There are a bunch of scripts in package.json file. Here's what they are and what they do:
|Script command||What it does|
||Cleans up any compilation output.|
||Clean dist folder, compiles ts and moves js to dist folder, run tslint task.|
There will be more over time.
file-upload-client module could be used by calling
upload method, accepting the following object:
interface IFileUploadClientSettingsassetId: string;assetDomain: string;assetToken: string;filePath: string;useLogging?: boolean;onProgressChanged?progress: IProgress: void;onMessage?errorMessage: string MessageLevel: MessageLevel: void;onStateChanged?status: FileUploadServiceState: void;
NOTE: assetId/assetDomain/assetToken should be provided by File Upload Service.
The upload events adds useful hooks to track upload process.
File Upload client public methods avaliable:
const fileUploadData =assetId: ""assetToken: ""assetUploadDomian: "";
const uploadClient = ... ;uploadClient;uploadClient;
const uploadClient = ... ;const isInProgress = uploadClient;