]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/shared/forms/reactive-file.component.ts
Add popover autoclose
[github/Chocobozzz/PeerTube.git] / client / src / app / shared / forms / reactive-file.component.ts
index f5758b6439f0ec3239ae08e5f72752afd7cfb7c4..8d22aa56ce91fa0ebf72fcff548878b16d6d8e65 100644 (file)
@@ -25,6 +25,7 @@ export class ReactiveFileComponent implements OnInit, ControlValueAccessor {
   @Output() fileChanged = new EventEmitter<Blob>()
 
   allowedExtensionsMessage = ''
+  fileInputValue: any
 
   private file: File
 
@@ -63,6 +64,8 @@ export class ReactiveFileComponent implements OnInit, ControlValueAccessor {
 
   writeValue (file: any) {
     this.file = file
+
+    if (!this.file) this.fileInputValue = null
   }
 
   registerOnChange (fn: (_: any) => void) {