Skip to content

Conversation

@PVince81
Copy link
Member

@PVince81 PVince81 commented Jan 12, 2022

Add a new approach for flagging an upload as aborted because we can't
rely on the browser fully cancelling the request as we now seem to
receive an error response from the server instead of a jQuery "abort"
message.

Fixes: #14897

  • TEST: abort one download
  • TEST: abort multiple download
  • TEST: test error message (404 when upload on non-existing folder) progress bar not removed!
  • TEST: upload files again after an error

@PVince81
Copy link
Member Author

since now the deletion of the upload object is delayed, it messed up with the accounting that operates the progress bar

I've pushed a fix to properly count the finished uploads so that the progress bar can be hidden, also in error cases.

@PVince81 PVince81 added 3. to review Waiting for reviews bug feature: files and removed 2. developing Work in progress labels Jan 12, 2022
@PVince81 PVince81 marked this pull request as ready for review January 12, 2022 15:57
Copy link
Contributor

@artonge artonge left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good.

abort: function() {
if (this.data.isChunked) {
this._deleteChunkFolder();
var self = this;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

self variable looks unused

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ah, leftover from previous fiddling. thanks for noticing

@PVince81 PVince81 added 4. to release Ready to be released and/or waiting for tests to finish and removed 3. to review Waiting for reviews labels Jan 12, 2022
Add a new approach for flagging an upload as aborted because we can't
rely on the browser fully cancelling the request as we now seem to
receive an error response from the server instead of a jQuery "abort"
message.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
Whenever an error occurs, also hide the progress bar.

The logic was also adjusted to properly detect uploads that are pending
deletion, in which case the progress bar can already be hidden.

Signed-off-by: Vincent Petry <vincent@nextcloud.com>
@PVince81 PVince81 force-pushed the bugfix/14897/fix-cancelling branch from d913f41 to 11c7e10 Compare January 12, 2022 19:21
@PVince81
Copy link
Member Author

I've fixed some bogus references to self and retested

@PVince81
Copy link
Member Author

/backport to stable23

@PVince81
Copy link
Member Author

/backport to stable22

@PVince81
Copy link
Member Author

/backport to stable21

@GuyPaddock
Copy link

This is excellent news!! Thank you so much, @PVince81!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

4. to release Ready to be released and/or waiting for tests to finish bug feature: files

Projects

None yet

Development

Successfully merging this pull request may close these issues.

An unknown error occurred when canceling big upload

5 participants