bleenco / ngx-uploader

Angular File Uploader
https://ngx-uploader.jankuri.me
MIT License
756 stars 348 forks source link

feat: Handling Failed Uploads #505

Closed vic10us closed 9 months ago

vic10us commented 4 years ago

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.

CLAassistant commented 4 years ago

CLA assistant check
All committers have signed the CLA.

jkuri commented 4 years ago

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

vic10us commented 4 years ago

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.

jkuri commented 4 years ago

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

vic10us commented 4 years ago

I amended the commit message. Is it ok?

jkuri commented 4 years ago

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 commented 4 years ago

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

vic10us commented 4 years ago

Bump to minor or patch? 7.2.0 or 7.1.1

jkuri commented 4 years ago

to minor.

vic10us commented 4 years ago

All requested changes done. :)

avechuche commented 4 years ago

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

vic10us commented 4 years ago

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

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

Flyover-ArtSk commented 4 years ago

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

tsmith-sdm commented 3 years ago

bump