Skip to content

Commit 329199b

Browse files
authored
Merge pull request #596 from ipfs-shipyard/fix/150mb-upload-crash
Fix Chromium crash on 150MB upload
2 parents 952e11f + 19cf1dd commit 329199b

File tree

3 files changed

+3
-11
lines changed

3 files changed

+3
-11
lines changed

add-on/src/popup/quick-upload.js

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,6 @@ async function processFiles (state, emitter, files) {
6262
const { ipfsCompanion } = await browser.runtime.getBackgroundPage()
6363
const uploadTab = await browser.tabs.getCurrent()
6464
let { streams, totalSize } = files2streams(files)
65-
if (!browser.runtime.id.includes('@')) {
66-
// we are in non-Firefox runtime (we know for a fact that Chrome puts no @ in id)
67-
if (state.ipfsNodeType === 'external' && totalSize >= 134217728) {
68-
// avoid crashing Chrome until the source of issue is fixed in js-ipfs-api
69-
// - https://github.com/ipfs-shipyard/ipfs-companion/issues/464
70-
// - https://github.com/ipfs/js-ipfs-api/issues/654
71-
throw new Error('Unable to process payload bigger than 128MiB in Chrome. See: js-ipfs-api/issues/654')
72-
}
73-
}
7465
progressHandler(0, totalSize, state, emitter)
7566
emitter.emit('render')
7667
const wrapFlag = (state.wrapWithDirectory || streams.length > 1)

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@
5757
"private": true,
5858
"preferGlobal": false,
5959
"resolutions": {
60+
"stream-http": "https://github.com/jhiesey/stream-http/tarball/2a8467dd84da9ab93cb43ca6cf78a75fef07f282/stream-http.tar.gz",
6061
"uglify-es": "npm:terser"
6162
},
6263
"devDependencies": {

yarn.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10687,9 +10687,9 @@ stream-each@^1.1.0:
1068710687
end-of-stream "^1.1.0"
1068810688
stream-shift "^1.0.0"
1068910689

10690-
stream-http@^2.7.2, stream-http@^2.8.3:
10690+
stream-http@^2.7.2, stream-http@^2.8.3, "stream-http@https://github.com/jhiesey/stream-http/tarball/2a8467dd84da9ab93cb43ca6cf78a75fef07f282/stream-http.tar.gz":
1069110691
version "2.8.3"
10692-
resolved "https://registry.yarnpkg.com/stream-http/-/stream-http-2.8.3.tgz#b2d242469288a5a27ec4fe8933acf623de6514fc"
10692+
resolved "https://github.com/jhiesey/stream-http/tarball/2a8467dd84da9ab93cb43ca6cf78a75fef07f282/stream-http.tar.gz#6975289c60e4f2061fb6f544472357ffd13c9170"
1069310693
dependencies:
1069410694
builtin-status-codes "^3.0.0"
1069510695
inherits "^2.0.1"

0 commit comments

Comments
 (0)