Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

upload-file-via-browser can only upload file size less than 165MB #788

Closed
liao1k opened this issue Jun 19, 2018 · 5 comments
Closed

upload-file-via-browser can only upload file size less than 165MB #788

liao1k opened this issue Jun 19, 2018 · 5 comments
Assignees

Comments

@liao1k
Copy link

liao1k commented Jun 19, 2018

Hi JS-IPFS-API Development Team,
I use upload-file-via-browser to upload file into IPFS, it can only upload the file size less than 160MB. Any file size large than 160MB, the web browser just stay here, no returning file hash id link showing on the web browser. Also Does "upload-file-via-browser" support upload multiple files? The current version can only support upload one single file at a time. Any comments are highly appreciated! Thanks for your help.

Kevin

@hugomrdias
Copy link
Contributor

i'll take a look at this. Thank you for reporting.
Do you have any more info? like browser vendor/version, which daemon are you running, anything would be helpful.

@liao1k
Copy link
Author

liao1k commented Jun 19, 2018

This is my demonstration web site: http://ipshare.info:3000/
Visit the above web site and upload a file which size is less than 160MB. The web browser can return the hash id, then try to upload a large file and you will see the local browser crashed. See the screenshot in the attachment.
uploadlargefile

I use google chrome Version 67.0.3396.87 (Official Build) (64-bit) for the local browser to upload file into IPFS system.

Webpack:
npm list webpack
[email protected] /home/donovan/UploadFiles
└── [email protected]

node -v:
v8.11.2

Operating System (Ubuntu: Ubuntu 18.04 LTS)
uname -a
Linux ipfs-dlchains 4.15.0-23-generic #25-Ubuntu SMP Wed May 23 18:02:16 UTC 2018 x86_64 x86_64 x86_64 GNU/Linux

$ npm start

[email protected] start /home/donovan/UploadFiles
node server.js

Listening at 172.16.0.254:3000
Hash: 6b3687b304ba5ea7451a
Version: webpack 2.7.0
Time: 2083ms
Asset Size Chunks Chunk Names
bundle.js 4.78 MB 0 [emitted] [big] main
chunk {0} bundle.js (main) 4.31 MB [entry] [rendered]
[23] (webpack)/buildin/module.js 517 bytes {0} [built]
[122] .//react-dom/lib/ReactMount.js 25.4 kB {0} [built]
[335] ./
/react-hot-api/modules/index.js 57 bytes {0} [built]
[336] .//react-hot-loader/RootInstanceProvider.js 1.18 kB {0} [built]
[338] ./
/react-hot-loader/makeExportsHot.js 1.73 kB {0} [built]
[366] ./src/index.js 1.46 kB {0} [built]
[367] (webpack)-dev-server/client?http://172.16.0.254:3000 4.16 kB {0} [built]
[368] (webpack)/hot/only-dev-server.js 2.29 kB {0} [built]
[732] .//react-dom/index.js 59 bytes {0} [built]
[811] ./src/App.js 5.47 kB {0} [built]
[862] ./
/strip-ansi/index.js 161 bytes {0} [built]
[868] (webpack)-dev-server/client/socket.js 897 bytes {0} [built]
[869] (webpack)/hot/emitter.js 77 bytes {0} [built]
[870] (webpack)/hot/log-apply-result.js 1.02 kB {0} [built]
[881] multi webpack-dev-server/client?http://172.16.0.254:3000 webpack/hot/only-dev-server ./src/index 52 bytes {0} [built]
+ 867 hidden modules
webpack: Compiled successfully.

Let me know if you need more info. Thanks for your help.

Kevin Liao

@liao1k
Copy link
Author

liao1k commented Jun 20, 2018

Hi Hugo Dias,
Any updates? Let me know. Thanks.

@hugomrdias hugomrdias self-assigned this Jun 26, 2018
@lidel
Copy link
Contributor

lidel commented Jun 28, 2018

I believe the Chrome crash is is the same issue as #654

I did some investigation on this as a part of ipfs/ipfs-companion#464 and in my case it seems an upload to an external node over js-ipfs-api breaks for files bigger than 128MB in size. AFAIK switching to streaming APIs does not help, because in browser context js-ipfs-api seems to buffer the entire thing in memory anyway.

Until it gets addressed, the only workaround I see is to check file size and user agent before upload and display error message informing them that uploads to an external node bigger than X are not possible with Chrome.

@hugomrdias
Copy link
Contributor

#868 fixes this issue

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

No branches or pull requests

4 participants