diff options
author | Rigel Kent <sendmemail@rigelk.eu> | 2020-11-23 10:45:42 +0100 |
---|---|---|
committer | Chocobozzz <chocobozzz@cpy.re> | 2020-12-03 10:15:49 +0100 |
commit | d4132d3f56b392a2e4e632db59e6644e4851228e (patch) | |
tree | be903734aa9ce3d669c40656a0f81bd3e9c7978c /server/controllers/api | |
parent | 4a54a93941d1c095bf249331df799c51e39c3774 (diff) | |
download | PeerTube-d4132d3f56b392a2e4e632db59e6644e4851228e.tar.gz PeerTube-d4132d3f56b392a2e4e632db59e6644e4851228e.tar.zst PeerTube-d4132d3f56b392a2e4e632db59e6644e4851228e.zip |
more explicit error messages for file uploads
Diffstat (limited to 'server/controllers/api')
-rw-r--r-- | server/controllers/api/videos/index.ts | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/server/controllers/api/videos/index.ts b/server/controllers/api/videos/index.ts index e8480d749..0dcd38ad2 100644 --- a/server/controllers/api/videos/index.ts +++ b/server/controllers/api/videos/index.ts | |||
@@ -174,8 +174,8 @@ function listVideoPrivacies (req: express.Request, res: express.Response) { | |||
174 | } | 174 | } |
175 | 175 | ||
176 | async function addVideo (req: express.Request, res: express.Response) { | 176 | async function addVideo (req: express.Request, res: express.Response) { |
177 | // Processing the video could be long | 177 | // Transferring the video could be long |
178 | // Set timeout to 10 minutes | 178 | // Set timeout to 10 minutes, as Express's default is 2 minutes |
179 | req.setTimeout(1000 * 60 * 10, () => { | 179 | req.setTimeout(1000 * 60 * 10, () => { |
180 | logger.error('Upload video has timed out.') | 180 | logger.error('Upload video has timed out.') |
181 | return res.sendStatus(408) | 181 | return res.sendStatus(408) |