From 30fc8b33baac0ef9d07d01666b433fa237142ae8 Mon Sep 17 00:00:00 2001
From: Hamza HRAMCHI <hamza.hramchi@xelians.fr>
Date: Thu, 20 Jan 2022 11:36:43 +0100
Subject: [PATCH] FIX #19466 TIME 0:35 update url to download signed document

---
 src/frontend/app/viewer/document-viewer.component.ts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/frontend/app/viewer/document-viewer.component.ts b/src/frontend/app/viewer/document-viewer.component.ts
index 69ce664ce00..606ba19c7ec 100755
--- a/src/frontend/app/viewer/document-viewer.component.ts
+++ b/src/frontend/app/viewer/document-viewer.component.ts
@@ -705,12 +705,12 @@ export class DocumentViewerComponent implements OnInit, OnDestroy {
                     (data: any) => {
                         if (data.encodedDocument) {
                             this.isSigned = this.file.subinfos.signedDocVersions;
-                            const fileToDownload: string = this.file.subinfos.signedDocVersions || this.file.subinfos.commentedDocVersions ? 'content' : 'originalContent';
+                            const fileToDownload: string = this.file.subinfos.signedDocVersions || this.file.subinfos.commentedDocVersions ? 'originalContent?signedVersion=true&mode=base64' : 'originalContent?mode=base64';
                             this.file.contentMode = 'route';
                             this.file.name = `${data.filename}`;
                             this.file.format = data.originalFormat;
                             this.file.signatoryId = data.signatoryId;
-                            this.file.content = `../rest/resources/${resId}/${fileToDownload}?mode=base64`;
+                            this.file.content = `../rest/resources/${resId}/${fileToDownload}`;
                             this.file.contentView = `../rest/resources/${resId}/content?mode=base64`;
                             this.file.src = this.base64ToArrayBuffer(data.encodedDocument);
                             this.loading = false;
-- 
GitLab