Longer timeout for /task/new

pull/62/head
Piero Toffanin 2018-12-13 17:03:41 -05:00
rodzic d0e1e1424e
commit 137e46098e
1 zmienionych plików z 4 dodań i 0 usunięć

Wyświetl plik

@ -163,6 +163,10 @@ app.post('/task/new', authCheck, (req, res, next) => {
next();
}
}, upload.array('images'), (req, res) => {
// TODO: consider doing the file moving in the background
// and return a response more quickly instead of a long timeout.
req.setTimeout(1000 * 60 * 20);
let srcPath = path.join("tmp", req.id);
// Print error message and cleanup