Skip to content

Let FileStream support bytesRead.#174

Open
ahuigo wants to merge 2 commits into
mscdex:masterfrom
ahuigo:master
Open

Let FileStream support bytesRead.#174
ahuigo wants to merge 2 commits into
mscdex:masterfrom
ahuigo:master

Conversation

@ahuigo

@ahuigo ahuigo commented Jul 30, 2018

Copy link
Copy Markdown

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

ahuigo commented Jul 30, 2018

Copy link
Copy Markdown
Author

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