busboy icon indicating copy to clipboard operation
busboy copied to clipboard

Let FileStream support bytesRead.

Open ahuigo opened this issue 7 years ago • 1 comments

Let FileStream inherits fs.ReadStream to support bytesRead property like this: https://github.com/mscdex/busboy/issues/173

busboy.on('file', function(fieldname, file, filename, encoding, mimetype) {
          const fs = require('fs')
          const ws = fs.createWriteStream('busboy.txt')
          const ps = file.pipe(ws)
          ps.on('finish', ()=>{
            console.log(file.bytesRead); // support bytesRead here
            console.log(ws.bytesWritten) 
            console.log(ps.bytesWritten) 
          })
    });

ahuigo avatar Jul 30 '18 10:07 ahuigo

Why not remove old node versions?

  matrix:
  - TRAVIS_NODE_VERSION="0.10"
  - TRAVIS_NODE_VERSION="0.12"

ahuigo avatar Jul 30 '18 10:07 ahuigo