Merge pull request #55 from leandropio/patch-1
Expose file size on success callback
This commit is contained in:
commit
1e4a5c9f2a
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue