Module: alfresco/services/_UploadHistoryServiceMixin

alfresco/services/_UploadHistoryServiceMixin

This mixin acts to group the upload-history handling of the FileUploadService.
Since:
  • 1.0.52
Author:
  • Martin Doyle
License:
Source:

Members

uploadHistory :string[]

This will be populated with the NodeRefs of the last few locations that the user has previously uploaded to. The number of NodeRefs that are stored are determined by the uploadHistorySize.
Type:
  • string[]
Default Value:
  • null
Source:

uploadHistoryPreferenceName :string

The preference name to use for storing and retrieving upload location history. In order for this preference to be used it will also be necessary to ensure that the PreferenceService is included on the page.
Type:
  • string
Default Value:
  • "org.alfresco.share.upload.destination.history"
Source:

uploadHistorySize :number

The number of nodes previously uploaded to that should be stored in the user preferences as their upload history. This defaults to 3 but can be overridden through configuration if required.
Type:
  • number
Default Value:
  • 3
Source:

Methods

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.
Source:

initUploadHistory()

Initialise the upload-history
Source:
Fires:
  • module:alfresco/core/topics#event:GET_PREFERENCE

setUploadHistory(value)

Set the current history.
Parameters:
Name Type Description
value string The preference value containing the nodeRefs last uploaded to
Source:

updateUploadHistory(nodeRef)

This updates the upload history with the supplied NodeRef. If the NodeRef is already in the history then it will not be added again, but will be re-ordered to be at the beginning of the history. If the history already contains the maximum number of entries then the earliest used NodeRef in the history will be removed and the latest added.
Parameters:
Name Type Description
nodeRef string The NodeRef to add to the upload history
Source:
Fires:
  • module:alfresco/core/topics#event:SET_PREFERENCE