diff options
Diffstat (limited to 'server/controllers/api/videos/upload.ts')
-rw-r--r-- | server/controllers/api/videos/upload.ts | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/server/controllers/api/videos/upload.ts b/server/controllers/api/videos/upload.ts index ebc17c760..c33d7fcb9 100644 --- a/server/controllers/api/videos/upload.ts +++ b/server/controllers/api/videos/upload.ts | |||
@@ -97,8 +97,11 @@ export async function addVideoLegacy (req: express.Request, res: express.Respons | |||
97 | // Uploading the video could be long | 97 | // Uploading the video could be long |
98 | // Set timeout to 10 minutes, as Express's default is 2 minutes | 98 | // Set timeout to 10 minutes, as Express's default is 2 minutes |
99 | req.setTimeout(1000 * 60 * 10, () => { | 99 | req.setTimeout(1000 * 60 * 10, () => { |
100 | logger.error('Upload video has timed out.') | 100 | logger.error('Video upload has timed out.') |
101 | return res.sendStatus(HttpStatusCode.REQUEST_TIMEOUT_408) | 101 | return res.fail({ |
102 | status: HttpStatusCode.REQUEST_TIMEOUT_408, | ||
103 | message: 'Video upload has timed out.' | ||
104 | }) | ||
102 | }) | 105 | }) |
103 | 106 | ||
104 | const videoPhysicalFile = req.files['videofile'][0] | 107 | const videoPhysicalFile = req.files['videofile'][0] |