ngx-uploader icon indicating copy to clipboard operation
ngx-uploader copied to clipboard

feat: Handling Failed Uploads

Open vic10us opened this issue 4 years ago • 14 comments

Adding the ability to handle failed uploads. This is done by adding the 'load' event on the XMLHttpRequrest and looking for a status < 400. Instead of bubbling an error I went with the approach of setting the file UploadStatus to Failed (new enum value) and pushing it in the observable state with a type of 'failed'.

I felt this would be the least disruptive and most simple to implement.

vic10us avatar Nov 27 '19 17:11 vic10us

CLA assistant check
All committers have signed the CLA.

CLAassistant avatar Nov 27 '19 17:11 CLAassistant

thanks for your PR. can you please amend commit message to follow guidelines and update readme for documentation.

jkuri avatar Nov 27 '19 18:11 jkuri

Can you point me to the guidelines? Also, I have updated the sample application to show usage. There was no reference to documentation that I could find.

vic10us avatar Nov 27 '19 18:11 vic10us

please check https://github.com/angular/angular/blob/master/CONTRIBUTING.md#commit so we can generate changelog with new feature.

jkuri avatar Nov 27 '19 18:11 jkuri

I amended the commit message. Is it ok?

vic10us avatar Nov 27 '19 18:11 vic10us

please do

git rebase -i HEAD~3

mark second and third commit with s and leave commit message feat: add handling of failed uploads then save.

git push origin master -f

then please let me know.

jkuri avatar Nov 27 '19 18:11 jkuri

also, please update version in package.json so we can publish new version to npm.

jkuri avatar Nov 27 '19 18:11 jkuri

Bump to minor or patch? 7.2.0 or 7.1.1

vic10us avatar Nov 27 '19 18:11 vic10us

to minor.

jkuri avatar Nov 27 '19 18:11 jkuri

All requested changes done. :)

vic10us avatar Nov 27 '19 21:11 vic10us

Hi, this is not in production yet, right? Thx!

avechuche avatar Feb 10 '20 16:02 avechuche

Hi, this is not in production yet, right? Thx!

Not that I am aware of. PR is still open.

vic10us avatar Feb 10 '20 17:02 vic10us

@jkuri can u please merge this pr? This is important feature. Without this - uploader show UPLOAD DONE when server response with error

Flyover-ArtSk avatar Apr 10 '20 10:04 Flyover-ArtSk

bump

tsmith-sdm avatar Jul 21 '21 14:07 tsmith-sdm