mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-5173] - improved fix for closing pdfjs worker error (#7225)
* [ACA-3847] - fixed download for external source file * [ADF-5173] - improved fix for closing pdfjs worker error * Fixed lint error
This commit is contained in:
@@ -45,7 +45,7 @@ export class AttachFileWidgetDialogService {
|
||||
* @param currentFolderId Upload file from specific folder
|
||||
* @returns Information about the chosen file(s)
|
||||
*/
|
||||
openLogin(repository: AlfrescoEndpointRepresentation, currentFolderId = '-my-'): Observable<Node[]> {
|
||||
openLogin(repository: AlfrescoEndpointRepresentation, currentFolderId = '-my-', accountIdentifier?: string): Observable<Node[]> {
|
||||
const { title, ecmHost, selected, registerExternalHost } = this.constructPayload(repository);
|
||||
const data: AttachFileWidgetDialogComponentData = {
|
||||
title,
|
||||
@@ -54,7 +54,8 @@ export class AttachFileWidgetDialogService {
|
||||
currentFolderId,
|
||||
isSelectionValid: (entry: Node) => entry.isFile,
|
||||
showFilesInResult: true,
|
||||
registerExternalHost
|
||||
registerExternalHost,
|
||||
accountIdentifier
|
||||
};
|
||||
|
||||
this.openLoginDialog(data, 'adf-attach-file-widget-dialog', '630px');
|
||||
|
@@ -238,11 +238,12 @@ export class AttachFileWidgetComponent extends UploadWidgetComponent implements
|
||||
}
|
||||
|
||||
private uploadFileFromExternalCS(repository: AlfrescoEndpointRepresentation, currentFolderId?: string) {
|
||||
this.attachDialogService.openLogin(repository, currentFolderId).subscribe(
|
||||
const accountIdentifier = `alfresco-${repository.id}-${repository.name}`;
|
||||
this.attachDialogService.openLogin(repository, currentFolderId, accountIdentifier).subscribe(
|
||||
(selections: any[]) => {
|
||||
selections.forEach((node) => node.isExternal = true);
|
||||
this.tempFilesList.push(...selections);
|
||||
this.uploadFileFromCS(selections, `alfresco-${repository.id}-${repository.name}`);
|
||||
this.uploadFileFromCS(selections, accountIdentifier);
|
||||
});
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user