]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.ts
Support drag and drop for video upload and torrent file import
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-edit / video-add-components / video-import-torrent.component.ts
index ed9cb5840803ca3345b68f196fb5c176715eaf1d..4d0b0b08087f7765b927f0a155b5dc31e2fd177e 100644 (file)
@@ -72,6 +72,11 @@ export class VideoImportTorrentComponent extends VideoSend implements OnInit, Ca
     this.importVideo(torrentfile)
   }
 
+  setTorrentFile (files: FileList) {
+    this.torrentfileInput.nativeElement.files = files
+    this.fileChange()
+  }
+
   importVideo (torrentfile?: Blob) {
     this.isImportingVideo = true
 
@@ -100,7 +105,6 @@ export class VideoImportTorrentComponent extends VideoSend implements OnInit, Ca
           previewUrl: null
         }))
 
-
         this.hydrateFormFromVideo()
       },