Skip to content
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

WINDUP-1447 Cancelling a file upload breaks the application #459

Merged
merged 2 commits into from Jun 16, 2017

Conversation

mrizzi
Copy link
Member

@mrizzi mrizzi commented Jun 15, 2017

No description provided.

@mrizzi mrizzi requested review from jsight and klinki June 15, 2017 10:01
this.onCompleteItem(item, response, status, headers);
if (!item.isCancel) {
this.onCompleteItem(item, response, status, headers);
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think this solution is reasonable.

IMHO it is nonsense to call onCompleteItem when upload is canceled or an error occurs, but it it the way original ng2-file-upload library had it so I kept it when I wrote this wrapper.

For me 👍

btw maybe item._onComplete shouldn't be called either?

@mrizzi
Copy link
Member Author

mrizzi commented Jun 16, 2017

With last commit, as @klinki suggested, also item._onComplete isn't called anymore in case of a cancelled upload.

@jsight
Copy link
Member

jsight commented Jun 16, 2017

Seems to work well here.

@jsight jsight merged commit 42e402f into windup:master Jun 16, 2017
@mrizzi mrizzi deleted the JIRA_WINDUP-1447 branch June 19, 2017 07:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants