Module: alfresco/services/UploadService

alfresco/services/UploadService

This service can be used to control the uploading of content as well as the updating the content of existing nodes on an Alfresco Repository.
Author:
  • Dave Draper
License:
Source:

Members

dialogButton :object

An internal reference to the progress dialog button
Type:
  • object
Since:
  • 1.0.52
Default Value:
  • null
Source:

i18nRequirements :object[]

An array of the i18n files to use with this widget.
Type:
  • object[]
Default Value:
  • [{i18nFile: "./i18n/UploadService.properties"}]
Source:

progressDialogTitleKey :string

This is the default title key for the progress dialog.
Type:
  • string
Deprecated:
Default Value:
  • null
Source:

uploadsContainerTitle :string

This is the default title for the uploads container.
Type:
  • string
Default Value:
  • "progress-dialog.title"
Source:

uploadsContainerTitleUpdateTopic :string

This is the topic on which to publish updates to the title container.
Type:
  • string
Source:

widgetsButtons :object[]

The buttons to use in the dialog. Note that if this is overridden then be cautious of re-using the "assignTo/assignToScope" properties, and to only use them if you fully understand their purpose.
Type:
  • object[]
Since:
  • 1.0.57
Source:

widgetsForProgressDialog :object

This defines the JSON structure for the widgets to be displayed in the progress dialog. This can be overridden by extending widgets to render a different display in the dialog
Type:
  • object
Deprecated:
Default Value:
  • null
Source:

widgetsForUploadDisplay :object[]

The widget definition that displays the uploads' progress. This should be a single widget that implements the interface defined by _UploadsDisplayMixin.
Type:
  • object[]
Since:
  • 1.0.52
Default Value:
  • [{name: "alfresco/upload/AlfUploadDisplay"}]
Source:

Methods

createProgressDialogTitle() → {string}

This function generates the title for the progress dialog. By default it simply displays the localized value of the uploadsContainerTitle
Source:
Returns:
The localized title for the progress dialog
Type
string

initService()

If a service needs to act upon its post-mixed-in state before registering subscriptions then this is where it should be done. It is comparable to postMixInProperties in a widget in the class lifecycle.
Since:
  • 1.0.52
Source:

onProgressDialogCancelClick(payload)

Handles the user clicking on the "Cancel" button in the dialog.
Parameters:
Name Type Description
payload object The details of the button click.
Source:

onProgressDialogOkClick(payload)

Handles the user clicking on the "OK" button in the dialog.
Parameters:
Name Type Description
payload object The details of the button click.
Source:

onUploadsBatchComplete(payload)

This listener will be called each time a batch of uploads (grouped by upload request) completes.
Parameters:
Name Type Description
payload object The payload containing the original upload request
Since:
  • 1.0.52
Source:

registerSubscriptions()

Register this service's subscriptions.
Source:
Listens to Events:

showUploadsWidget() → {object}

Ensure the uploads display widget is available
Source:
Listens to Events:
Returns:
A promise, that will resolve when the widget is ready to accept upload information.
Type
object