]> git.immae.eu Git - github/Chocobozzz/PeerTube.git/blobdiff - client/src/app/videos/+video-edit/video-add.component.ts
Refractor peertube videojs plugin
[github/Chocobozzz/PeerTube.git] / client / src / app / videos / +video-edit / video-add.component.ts
index a86d9d3c22cbabf4231fdb9485a34d771695ad1e..d0d17fa86b1a3c7170303e52927049ab9e278f93 100644 (file)
@@ -95,8 +95,10 @@ export class VideoAddComponent extends FormReactive implements OnInit {
 
   uploadFirstStep () {
     const videofile = this.videofileInput.nativeElement.files[0]
+    if (!videofile) return
+
     const videoQuota = this.authService.getUser().videoQuota
-    if ((this.userVideoQuotaUsed + videofile.size) > videoQuota) {
+    if (videoQuota !== -1 && (this.userVideoQuotaUsed + videofile.size) > videoQuota) {
       const bytePipes = new BytesPipe()
 
       const msg = 'Your video quota is exceeded with this video ' +