diff --git a/controllers/uploadController.js b/controllers/uploadController.js index f45043d..321ad88 100644 --- a/controllers/uploadController.js +++ b/controllers/uploadController.js @@ -432,6 +432,8 @@ self.actuallyUpload = async (req, res, data = {}) => { if (hashStream) { hashStream.once('error', _reject) + // Ensure readStream will only be resumed later down the line by readStream.pipe() + readStream.pause() readStream.on('data', data => { // .dispose() will destroy this internal component, // so use it as an indicator of whether the hashStream has been .dispose()'d