projects
/
oweals
/
peertube.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
59c9c5d
)
Increase timeout on upload endpoint
author
Chocobozzz
<me@florianbigard.com>
Mon, 1 Oct 2018 07:14:00 +0000
(09:14 +0200)
committer
Chocobozzz
<me@florianbigard.com>
Mon, 1 Oct 2018 07:14:00 +0000
(09:14 +0200)
server/controllers/api/videos/index.ts
patch
|
blob
|
history
diff --git
a/server/controllers/api/videos/index.ts
b/server/controllers/api/videos/index.ts
index 581046782e775b68c3bfcd4218d04d1e10153cee..15ef8d4580daa81fb9460727b196c9913d49a12d 100644
(file)
--- 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) {
}
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