From c480a0cb239144e02c9c911e78971f99bc5a6034 Mon Sep 17 00:00:00 2001
From: Guillaume Heurtier <guillaume.heurtier@maarch.org>
Date: Wed, 8 Apr 2020 17:04:03 +0200
Subject: [PATCH] FIX #13719 TIME 2:30 fix re-upload same file after removing
 it

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

diff --git a/src/frontend/app/viewer/document-viewer.component.ts b/src/frontend/app/viewer/document-viewer.component.ts
index f6eb6e4aab5..02ec45e71ec 100755
--- a/src/frontend/app/viewer/document-viewer.component.ts
+++ b/src/frontend/app/viewer/document-viewer.component.ts
@@ -1,4 +1,4 @@
-import { Component, OnInit, Input, ViewChild, EventEmitter, Output } from '@angular/core';
+import {Component, OnInit, Input, ViewChild, EventEmitter, Output, ElementRef} from '@angular/core';
 import { HttpClient, HttpEventType } from '@angular/common/http';
 import { LANG } from '../translate.component';
 import { NotificationService } from '../notification.service';
@@ -131,6 +131,7 @@ export class DocumentViewerComponent implements OnInit {
 
     @ViewChild('templateList', { static: true }) templateList: PluginSelectSearchComponent;
     @ViewChild('onlyofficeViewer', { static: false }) onlyofficeViewer: EcplOnlyofficeViewerComponent;
+    @ViewChild('docToUpload', { static: false }) docToUpload: ElementRef<HTMLInputElement>;
 
     constructor(
         public http: HttpClient,
@@ -442,6 +443,7 @@ export class DocumentViewerComponent implements OnInit {
                     content: null,
                     src: null
                 };
+                this.docToUpload.nativeElement.value = "";
                 this.triggerEvent.emit('cleanFile');
             }),
             catchError((err: any) => {
-- 
GitLab