Provides a way in which a user can quickly upload one or more files to a non-contextual location (e.g. a
location anywhere within the Alfresco Repository and not necessarily related to a location currently
being displayed). This supports both drag-and-drop file upload (where only the location is prompted for)
and an accessible button that can be clicked (to prompt for both the files and the location to upload to).
- Since:
- 1.0.34
- Copyright:
- Copyright (C) 2005-2020 Alfresco Software Limited
- License:
- GNU Lesser General Public License, see: Open Source Licensing
- Source:
Extends
Mixes In
Members
-
cssRequirements :object[]
-
An array of the CSS files to use with this widget.
Type:
- object[]
- Default Value:
- [{cssFile:"./css/UploadTarget.css"}]
- Source:
-
i18nRequirements :object[]
-
An array of the i18n files to use with this widget.
Type:
- object[]
- Default Value:
- [{i18nFile: "./i18n/UploadTarget.properties"}]
- Source:
-
templateString :string
-
The HTML template to use for the widget.
Type:
- string
- Source:
-
uploadInstructions :string
-
The instruction message to display on the drag-and-drop target. This can be a localization message key.
Type:
- string
- Default Value:
- "upload.target.instruction"
- Source:
-
widgetsForButton :object[]
-
A widget model for requesting both the files to upload as well as the location to upload them to. By default the widget model is just a basic AlfButton.
Type:
- object[]
- Source:
-
widgetsForLocationSelection :object[]
-
The widget model for providing the user with an interface to be displayed in a form dialog for selecting the location to upload files to when they are dragged and dropped onto the widget.
Type:
- object[]
- Source:
Methods
-
getUploadConfig()
-
Override the inherited function to return a configuration object that indicates an overwrite action is required. This will cause the onDndUploadDrop function to call publishUpdateRequest.
- Source:
-
postCreate()
-
Sets up the widgets DOM element with file drag-and-drop upload capabilities.
- Source:
-
postMixInProperties()
-
Ensures that the upload instructions are set an localized.
- Source:
-
publishUpdateRequest(uploadConfig, files)
-
Overrides the inherited function to change that publication that is made when files are dragged and dropped onto the widget to render the widgetsForLocationSelection model in a dialog.
Parameters:
Name Type Description uploadConfig
object The upload configuration. files
object[] The files that have been dragged and dropped onto the widget - Source:
Fires: