diff --git a/src/routes/apps.js b/src/routes/apps.js index 079d276c0..f4d7b2b9e 100644 --- a/src/routes/apps.js +++ b/src/routes/apps.js @@ -789,6 +789,8 @@ function uploadFile(req, res, next) { if (typeof req.query.file !== 'string' || !req.query.file) return next(new HttpError(400, 'file query argument must be provided')); if (!req.files.file) return next(new HttpError(400, 'file must be provided as multipart')); + req.clearTimeout(); + apps.uploadFile(req.app, req.files.file.path, req.query.file, function (error) { if (error) return next(BoxError.toHttpError(error)); @@ -801,6 +803,8 @@ function downloadFile(req, res, next) { if (typeof req.query.file !== 'string' || !req.query.file) return next(new HttpError(400, 'file query argument must be provided')); + req.clearTimeout(); + apps.downloadFile(req.app, req.query.file, function (error, stream, info) { if (error) return next(BoxError.toHttpError(error));