Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also .

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also .
  • 2 commits
  • 2 files changed
  • 0 commit comments
  • 1 contributor
Showing with 8 additions and 2 deletions.
  1. +7 −1 index.js
  2. +1 −1 package.json
View
@@ -317,12 +317,18 @@ Dat.prototype.createFileWriteStream = function (key, opts) {
})
}
stream.progress = {bytes: 0}
stream.setReadable(false)
this.open(function (err, self) {
if (err) return stream.destroy(err)
if (!self._index.blobs) return destroy(new Error('No blob store attached'))
var ws = self._index.blobs.createWriteStream()
var monitor = through(function (data, enc, cb) {
stream.progress.bytes += data.length
stream.emit('progress')
cb(null, data)
})
stream.on('prefinish', function () {
stream.cork()
@@ -334,7 +340,7 @@ Dat.prototype.createFileWriteStream = function (key, opts) {
})
})
stream.setWritable(ws)
stream.setWritable(pumpify(monitor, ws))
})
return stream
View
@@ -1,6 +1,6 @@
{
"name": "dat-core",
"version": "3.4.0",
"version": "3.5.0",
"description": "dat core",
"main": "index.js",
"dependencies": {

No commit comments for this range