[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:
Vito
2021-09-28 11:47:04 +01:00
committed by GitHub
parent df08e36d24
commit f963c6d15e
4 changed files with 17 additions and 6 deletions

View File

@@ -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');

View File

@@ -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);
});
}