From c9ff8a08a06ef0f30ec4963aebfcc02293ca20c5 Mon Sep 17 00:00:00 2001 From: Rigel Kent Date: Fri, 3 Apr 2020 00:22:04 +0200 Subject: Support drag and drop for video upload and torrent file import --- .../video-add-components/video-import-torrent.component.ts | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.ts') diff --git a/client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.ts b/client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.ts index e47624dd6..4d0b0b080 100644 --- a/client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.ts +++ b/client/src/app/videos/+video-edit/video-add-components/video-import-torrent.component.ts @@ -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 -- cgit v1.2.3