diff --git a/lib/storage-handler.js b/lib/storage-handler.js index 2abd4ec..308bc54 100644 --- a/lib/storage-handler.js +++ b/lib/storage-handler.js @@ -135,6 +135,7 @@ exports.upload = function (provider, req, res, options, cb) { if (maxFileSize) { part.on('data', function (buffer) { fileSize += buffer.length; + file.size = fileSize; if (fileSize > maxFileSize) { // We are missing some way to tell the provider to cancel upload/multipart upload of the current file. // - s3-upload-stream doesn't provide a way to do this in it's public interface