Closed dvalentiate closed 8 years ago
I don't use this, but I'm happy to merge!
Is this merged updated end
event included in the 4.4.0 npm release? I am observing the end event firing too early with 4.4.0 installed. I see I'm on node 5.6.0 and that wasn't explicitly tested here.
Currently
uploadDir
method fails because it doesn't wait for individual upload steams to end before emitting theend
event. It does wait until the total data sent reaches the expected amount but this happens before the files are reliably on S3 and theend
event for each file occurs.This pull request adds a
activeTransfer
counter that increments with a new file being uploaded and decrements when the file has anend
event.It also adds a test that fails on the current master but passes with these changes. Tested on node
v0.10.35
,v0.12.7
,v4.3.2
, andv5.7.1
.