-
Notifications
You must be signed in to change notification settings - Fork 5.1k
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
fix:when upload large file,we cant stop #3373
Conversation
@@ -1220,12 +1220,14 @@ define([ | |||
NotebookList.prototype.add_large_file_upload_button = function (file) { | |||
var that = this; | |||
var item = that.new_item(0, true); | |||
var stop_singnal = false; |
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.
singnal
-> signal
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.
Ping @forbxy - can you make this spelling change?
@@ -1276,6 +1278,9 @@ define([ | |||
var upload_file = null; | |||
|
|||
var large_reader_onload = function (event) { | |||
if (stop_singnal === true) { | |||
return; |
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.
Should this also abort the file reader? https://developer.mozilla.org/en-US/docs/Web/API/FileReader/abort
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.
file reader is a local variable,one chunk one file reader var,we stopped before new file reader create (after last chunk uploaded), so we don't need to abort file reader
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.
should I make a commit to fix the word(singnal)?or it is already changed after you review?
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.
You'll need to make a commit to fix it - my comment was just pointing it out.
Thanks! |
the cancel button' action only remove its html item, don't stop upload event before