From: Chocobozzz Date: Tue, 20 Feb 2018 08:53:42 +0000 (+0100) Subject: Add filename in upload form title X-Git-Tag: v0.0.26-alpha~16 X-Git-Url: https://git.librecmc.org/?a=commitdiff_plain;h=2f315e2f915514eaddee30394b0d99790bcda06b;p=oweals%2Fpeertube.git Add filename in upload form title --- 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