diff options
Diffstat (limited to 'client/src/app')
-rw-r--r-- | client/src/app/videos/+video-edit/video-add.component.ts | 8 |
1 files changed, 7 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 e81243d3e..324f26983 100644 --- a/client/src/app/videos/+video-edit/video-add.component.ts +++ b/client/src/app/videos/+video-edit/video-add.component.ts | |||
@@ -133,9 +133,15 @@ export class VideoAddComponent extends FormReactive implements OnInit, OnDestroy | |||
133 | } | 133 | } |
134 | 134 | ||
135 | uploadFirstStep () { | 135 | uploadFirstStep () { |
136 | const videofile = this.videofileInput.nativeElement.files[0] | 136 | const videofile = this.videofileInput.nativeElement.files[0] as File |
137 | if (!videofile) return | 137 | if (!videofile) return |
138 | 138 | ||
139 | // Cannot upload videos > 4GB for now | ||
140 | if (videofile.size > 4 * 1024 * 1024 * 1024) { | ||
141 | this.notificationsService.error('Error', 'We are sorry but PeerTube cannot handle videos > 4GB') | ||
142 | return | ||
143 | } | ||
144 | |||
139 | const videoQuota = this.authService.getUser().videoQuota | 145 | const videoQuota = this.authService.getUser().videoQuota |
140 | if (videoQuota !== -1 && (this.userVideoQuotaUsed + videofile.size) > videoQuota) { | 146 | if (videoQuota !== -1 && (this.userVideoQuotaUsed + videofile.size) > videoQuota) { |
141 | const bytePipes = new BytesPipe() | 147 | const bytePipes = new BytesPipe() |