Module: alfresco/upload/UploadsDisplayInterface

alfresco/upload/UploadsDisplayInterface

This class acts as an interface for widgets displaying uploads' progress, and all widgets used for displaying uploads' progress through any services extended from _BaseUploadService (e.g. FileUploadService and UploadService).
Since:
  • 1.0.60
Author:
  • Martin Doyle
License:
Source:

Methods

addFailedFile(fileName, error)

This function handles displaying a file that could not be uploaded (where the failure was identified before any attempt was made to start uploading the file).
Parameters:
Name Type Description
fileName string The name of the file that could not be uploaded
error object The details of why the file could not be uploaded.
Source:

addInProgressFile(fileId)

This function handles displaying a file that an attempt will be made to upload. The updateUploadProgress function will handle updating the upload progress.
Parameters:
Name Type Description
fileId string The unique id of the file
Source:

handleCompletedUpload(fileId, completionEvt, request)

This function handles the successful completion of a file upload. By default it moves the displayed file from the "In progress" section to the "Completed" section.
Parameters:
Name Type Description
fileId string The unique id of the file
completionEvt object The upload completions event
request object The request object used to attempt to upload the file
Source:

handleFailedUpload(fileId, completionEvt, request)

This function handles the failure to upload a file. By default it moves the displayed file from the "In Progress" section to the "Failed" section.
Parameters:
Name Type Description
fileId string The unique id of the file
completionEvt object The upload completions event
request object The request object used to attempt to upload the file
Source:

reset()

Resets the display.
Source:

updateAggregateProgress(aggregateProgress)

Displays the overall upload progress of all the files.
Parameters:
Name Type Description
aggregateProgress number The aggregate progress as a decimal of 1.
Source:

updateUploadProgress(fileId, percentageComplete)

Updates the displayed progress for an individual file upload.
Parameters:
Name Type Description
fileId string The unique id of the file
percentageComplete number The current upload progress as a percentage
Source: