Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Let FileStream support bytesRead. #174

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open

Conversation

ahuigo
Copy link

@ahuigo ahuigo commented Jul 30, 2018

Let FileStream inherits fs.ReadStream to support bytesRead property like this:
#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
Copy link
Author

ahuigo commented Jul 30, 2018

Why not remove old node versions?

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants