-
Notifications
You must be signed in to change notification settings - Fork 324
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
Upload screen feedback and bugfixes #483
Conversation
- display visual feedback for ongoing upload (realtime if possible) - use streaming to solve a set of errors caused by big files and js-ipfs
More context: #464
add-on/src/popup/quick-upload.js
Outdated
pin: state.pinUpload | ||
} | ||
console.log('Calling background.ipfsAddAndShow', files) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove debug logging
add-on/src/popup/quick-upload.js
Outdated
@@ -141,7 +181,7 @@ function quickUploadPage (state, emit) { | |||
</emph> | |||
${browser.i18n.getMessage('quickUpload_drop_it_here')} | |||
</span> | |||
<p class='f4'>${state.message}</p> | |||
<p class='f4 db relative'>${state.message}<span class='code db absolute fr pv2'>${state.progress}</span></p> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need absolute / relative position dancing here.
package.json
Outdated
@@ -90,9 +90,11 @@ | |||
"web-ext": "2.6.0" | |||
}, | |||
"dependencies": { | |||
"byte-size": "4.0.3", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we're using filesize
in ipld-cli and share-via-ips and webui
https://www.npmjs.com/package/filesize
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@olizilla I was unable to set up filesize
in a way that keeps static number of decimal digits 🙃
So I just dropped them, to keep things simple:
As suggested in #483 (review)
Improvements
Fixes
Future Improvements
Preview
when js-ipfs is used, progress is provided in realtime (js-ipfs-api displays buffering state for the most of time):
Useful commands
Creating a sparse file (filled with zeroes) of arbitrary size:
Big files filled with zeroes are handy for tests with js-ipfs, which has a limited repo store size (one chunk will just be reused).