aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/controllers
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-10-01 09:14:00 +0200
committerChocobozzz <me@florianbigard.com>2018-10-01 09:14:00 +0200
commit8b917537af2217ad0c87d49fd2ffa693d46a499c (patch)
treea1901fca2af784ae251a665a58665fe5330c063a /server/controllers
parent59c9c5d9bb383cff118c4d8086cf3e3f43774404 (diff)
downloadPeerTube-8b917537af2217ad0c87d49fd2ffa693d46a499c.tar.gz
PeerTube-8b917537af2217ad0c87d49fd2ffa693d46a499c.tar.zst
PeerTube-8b917537af2217ad0c87d49fd2ffa693d46a499c.zip
Increase timeout on upload endpoint
Diffstat (limited to 'server/controllers')
-rw-r--r--server/controllers/api/videos/index.ts7
1 files changed, 7 insertions, 0 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts
index 581046782..15ef8d458 100644
--- a/server/controllers/api/videos/index.ts
+++ b/server/controllers/api/videos/index.ts
@@ -158,6 +158,13 @@ function listVideoPrivacies (req: express.Request, res: express.Response) {
158} 158}
159 159
160async function addVideo (req: express.Request, res: express.Response) { 160async function addVideo (req: express.Request, res: express.Response) {
161 // Processing the video could be long
162 // Set timeout to 10 minutes
163 req.setTimeout(1000 * 60 * 10, () => {
164 logger.error('Upload video has timed out.')
165 return res.sendStatus(408)
166 })
167
161 const videoPhysicalFile = req.files['videofile'][0] 168 const videoPhysicalFile = req.files['videofile'][0]
162 const videoInfo: VideoCreate = req.body 169 const videoInfo: VideoCreate = req.body
163 170