diff --git a/src/frontend/app/viewer/document-viewer.component.ts b/src/frontend/app/viewer/document-viewer.component.ts
index e00a80b441e759eb5eb22fd5862d3f0dd8949337..118cac3d5a38d1d073a13781f463a94b1695c2ed 100755
--- a/src/frontend/app/viewer/document-viewer.component.ts
+++ b/src/frontend/app/viewer/document-viewer.component.ts
@@ -394,7 +394,7 @@ export class DocumentViewerComponent implements OnInit, OnDestroy {
                     const objToSend: any = {
                         resId: this.resId,
                         encodedFile: file.content,
-                        format: data.format
+                        format: file.format
                     };
                     this.http.put(`../rest/resources/${this.resId}?onlyDocument=true`, objToSend).pipe(
                         tap(() => {
@@ -733,7 +733,7 @@ export class DocumentViewerComponent implements OnInit, OnDestroy {
     }
 
     openPdfInTab() {
-        let src = '';
+        const src = '';
         if (this.file.contentMode === 'route'){
             this.http.get(this.file.content, { responseType: 'json' }).pipe(
                 tap((data: any) => {