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

Update stream-to-blob-url to the latest version 🚀 #1692

Merged
merged 2 commits into from Aug 9, 2019
Merged
Changes from all commits
Commits
File filter...
Filter file types
Jump to…
Jump to file or symbol
Failed to load files and symbols.

Always

Just for now

@@ -105,12 +105,19 @@ class File extends EventEmitter {
getBlob (cb) {
if (typeof window === 'undefined') throw new Error('browser-only method')
streamToBlob(this.createReadStream(), this._getMimeType())
.then(blob => cb(null, blob), cb)
.then(
blob => cb(null, blob),
err => cb(err)
)
}

getBlobURL (cb) {
if (typeof window === 'undefined') throw new Error('browser-only method')
streamToBlobURL(this.createReadStream(), this._getMimeType(), cb)
streamToBlobURL(this.createReadStream(), this._getMimeType())
.then(
blobUrl => cb(null, blobUrl),
err => cb(err)
)
}

appendTo (elem, opts, cb) {
@@ -65,7 +65,7 @@
"simple-sha1": "^2.0.8",
"speedometer": "^1.0.0",
"stream-to-blob": "^2.0.0",
"stream-to-blob-url": "^2.1.0",
"stream-to-blob-url": "^3.0.0",
"stream-with-known-length-to-buffer": "^1.0.0",
"torrent-discovery": "^9.1.1",
"torrent-piece": "^2.0.0",
ProTip! Use n and p to navigate between commits in a pull request.
You can’t perform that action at this time.