diff options
Diffstat (limited to 'server/middlewares/validators/videos/videos.ts')
-rw-r--r-- | server/middlewares/validators/videos/videos.ts | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/server/middlewares/validators/videos/videos.ts b/server/middlewares/validators/videos/videos.ts index 52e6c5762..7f278c9f6 100644 --- a/server/middlewares/validators/videos/videos.ts +++ b/server/middlewares/validators/videos/videos.ts | |||
@@ -402,7 +402,8 @@ const videosAcceptChangeOwnershipValidator = [ | |||
402 | if (isAble === false) { | 402 | if (isAble === false) { |
403 | res.fail({ | 403 | res.fail({ |
404 | status: HttpStatusCode.PAYLOAD_TOO_LARGE_413, | 404 | status: HttpStatusCode.PAYLOAD_TOO_LARGE_413, |
405 | message: 'The user video quota is exceeded with this video.' | 405 | message: 'The user video quota is exceeded with this video.', |
406 | type: ServerErrorCode.QUOTA_REACHED | ||
406 | }) | 407 | }) |
407 | return | 408 | return |
408 | } | 409 | } |
@@ -628,7 +629,8 @@ async function commonVideoChecksPass (parameters: { | |||
628 | if (!isVideoFileSizeValid(videoFileSize.toString())) { | 629 | if (!isVideoFileSizeValid(videoFileSize.toString())) { |
629 | res.fail({ | 630 | res.fail({ |
630 | status: HttpStatusCode.PAYLOAD_TOO_LARGE_413, | 631 | status: HttpStatusCode.PAYLOAD_TOO_LARGE_413, |
631 | message: 'This file is too large. It exceeds the maximum file size authorized.' | 632 | message: 'This file is too large. It exceeds the maximum file size authorized.', |
633 | type: ServerErrorCode.MAX_FILE_SIZE_REACHED | ||
632 | }) | 634 | }) |
633 | return false | 635 | return false |
634 | } | 636 | } |
@@ -636,7 +638,8 @@ async function commonVideoChecksPass (parameters: { | |||
636 | if (await isAbleToUploadVideo(user.id, videoFileSize) === false) { | 638 | if (await isAbleToUploadVideo(user.id, videoFileSize) === false) { |
637 | res.fail({ | 639 | res.fail({ |
638 | status: HttpStatusCode.PAYLOAD_TOO_LARGE_413, | 640 | status: HttpStatusCode.PAYLOAD_TOO_LARGE_413, |
639 | message: 'The user video quota is exceeded with this video.' | 641 | message: 'The user video quota is exceeded with this video.', |
642 | type: ServerErrorCode.QUOTA_REACHED | ||
640 | }) | 643 | }) |
641 | return false | 644 | return false |
642 | } | 645 | } |