From 2f315e2f915514eaddee30394b0d99790bcda06b Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Tue, 20 Feb 2018 09:53:42 +0100 Subject: [PATCH] Add filename in upload form title --- client/src/app/videos/+video-edit/video-add.component.html | 3 ++- client/src/app/videos/+video-edit/video-add.component.ts | 3 +++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/client/src/app/videos/+video-edit/video-add.component.html b/client/src/app/videos/+video-edit/video-add.component.html index 6dcf5bf75..440556562 100644 --- a/client/src/app/videos/+video-edit/video-add.component.html +++ b/client/src/app/videos/+video-edit/video-add.component.html @@ -1,6 +1,7 @@
- Upload your video + Upload your video + Upload {{ videoFileName }}
diff --git a/client/src/app/videos/+video-edit/video-add.component.ts b/client/src/app/videos/+video-edit/video-add.component.ts index 75d608162..e81243d3e 100644 --- a/client/src/app/videos/+video-edit/video-add.component.ts +++ b/client/src/app/videos/+video-edit/video-add.component.ts @@ -37,6 +37,7 @@ export class VideoAddComponent extends FormReactive implements OnInit, OnDestroy id: 0, uuid: '' } + videoFileName: string form: FormGroup formErrors: { [ id: string ]: string } = {} @@ -147,6 +148,8 @@ export class VideoAddComponent extends FormReactive implements OnInit, OnDestroy return } + this.videoFileName = videofile.name + const name = videofile.name.replace(/\.[^/.]+$/, '') const privacy = this.firstStepPrivacyId.toString() const nsfw = false