Purpose:
When invoked, this action will allow the user to select and attach files from the host applications document repository (the Encompass eFolder, for example), or upload attachments from their local drive. \n \nReferences to said file attachments - referred to as resources in the EPC API - are made available to the caller of this method once the action is fulfilled by the user.
| Inputs |
|---|
| allowedSourceTypes Data type : list of strings Purpose : Allowed values : "esign", "efolder", "partner" Example : "allowedSourceTypes": ["esign", "efolder"] |
| allowedFileTypes Data type : list of strings Purpose : Allowed values : All extensions are allowed except ".dll" and ".exe". Example : "allowedFileTypes": ["image/jpeg", "image/png", ".pdf", ".docx"] |
| disableLocalUpload Data type : boolean purpose : hide/show upload from local machine icon By default it is false. Upload from local is visible unless you set this parameter to true. Example : "disableLocalUpload": false |
| hideUnassignedFiles data type : boolean Purpose: hide/show the eFolder unassigned files By default it is false. Unassigned files are visible unless you set this parameter to true. Only applicable if allowedSourceTypes contain 'efolder' Example : "hideUnassignedFiles": false |
| stackingTemplates Data type : boolean Purpose : hide/show the stacking template dropdown. Example : "stackingTemplates": false |
Returns:
Type: Promise
==> Resolved
A list of the attachments - referred to as resources in the EPC API - and associated attributes:
[
{
id: "<id>",
repository: "urn:elli:skydrive",
name: "<name>",
mimeType: "<mimeType>"
},
{
id: "<id>",
repository: "urn:elli:skydrive",
name: "<name>",
mimeType: "<mimeType>"
}
]
The id, name and mimeType attributes need to be echoed back to the EPC platform for each selected resource, as part of the transaction.create() method call when initializing a transaction (under the $.request.resources object). Read the transaction.create() method reference for more details.
Also - if the user closes the file selection modal without attaching any files - the Promise will resolve to an empty array - []
==> Rejected
An error is raised, containing a message attribute with details on the error that occurred
{
message: "{{ERROR_DETAILS}}"
}
