Skip to main content

FileUploaderObservers

A set of functions that are used to bridge the gap between FileUploadManager and FileUploadService.

FileUploadManager uses these observers to file uploads sent by FileUploadService.

interface FileUploaderObservers<Response = string> {
onFileUploadStart: (newFileUpload: FileUpload<Response>, isRetry: boolean) => void;
onFileProgressUpdate: (updatedFileUpload: FileUpload<Response>) => void;
onFileUploadComplete: (completedFileUpload: FileUpload<Response>) => void;
}

onFileUploadStart (newFileUpload: FileUpload<Response>, isRetry: boolean) => void

Called to indicate that the file upload has started, and whether or not it is a retry.

onFileProgressUpdate (updatedFileUpload: FileUpload<Response>) => void

Called to indicate that the file upload progress has changed.

onFileUploadComplete (completedFileUpload: FileUpload<Response>) => void

Called to indicate that the file upload is complete. This means it was either successful or a failure.