Increase timeout on upload endpoint
This commit is contained in:
parent
59c9c5d9bb
commit
8b917537af
|
@ -158,6 +158,13 @@ function listVideoPrivacies (req: express.Request, res: express.Response) {
|
|||
}
|
||||
|
||||
async function addVideo (req: express.Request, res: express.Response) {
|
||||
// Processing the video could be long
|
||||
// Set timeout to 10 minutes
|
||||
req.setTimeout(1000 * 60 * 10, () => {
|
||||
logger.error('Upload video has timed out.')
|
||||
return res.sendStatus(408)
|
||||
})
|
||||
|
||||
const videoPhysicalFile = req.files['videofile'][0]
|
||||
const videoInfo: VideoCreate = req.body
|
||||
|
||||
|
|
Loading…
Reference in New Issue