diff options
Diffstat (limited to 'client')
-rw-r--r-- | client/src/app/videos/+video-edit/video-add.component.ts | 11 |
1 files changed, 10 insertions, 1 deletions
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 4c9dbf1bb..ae5548897 100644 --- a/client/src/app/videos/+video-edit/video-add.component.ts +++ b/client/src/app/videos/+video-edit/video-add.component.ts | |||
@@ -156,7 +156,16 @@ export class VideoAddComponent extends FormReactive implements OnInit, OnDestroy | |||
156 | 156 | ||
157 | this.videoFileName = videofile.name | 157 | this.videoFileName = videofile.name |
158 | 158 | ||
159 | const name = videofile.name.replace(/\.[^/.]+$/, '') | 159 | const nameWithoutExtension = videofile.name.replace(/\.[^/.]+$/, '') |
160 | let name: string | ||
161 | |||
162 | // If the name of the file is very small, keep the extension | ||
163 | if (nameWithoutExtension.length < 3) { | ||
164 | name = videofile.name | ||
165 | } else { | ||
166 | name = nameWithoutExtension | ||
167 | } | ||
168 | |||
160 | const privacy = this.firstStepPrivacyId.toString() | 169 | const privacy = this.firstStepPrivacyId.toString() |
161 | const nsfw = false | 170 | const nsfw = false |
162 | const commentsEnabled = true | 171 | const commentsEnabled = true |