video: catch bad request for json

Signed-off-by: Varun Patil <radialapps@gmail.com>
pull/653/head
Varun Patil 2023-04-25 13:48:25 -07:00
parent 0718a03ee0
commit 081687838a
1 changed files with 5 additions and 0 deletions

View File

@ -196,6 +196,11 @@ class VideoController extends GenericApiController
throw Exceptions::NotFound('live video data'); throw Exceptions::NotFound('live video data');
} }
// Cannot return JSON if it is not a file
if ('json' === $format) {
throw Exceptions::BadRequest('Invalid format');
}
// Transcode video if allowed // Transcode video if allowed
if ($transcode && !$this->config->getSystemValue('memories.vod.disable', true)) { if ($transcode && !$this->config->getSystemValue('memories.vod.disable', true)) {
// If video path not given, write to temp file // If video path not given, write to temp file