ribizli / ng2-imageupload

A component which resizes the selected file image
29 stars 10 forks source link

Cannot add same image again #26

Closed shamilasallay closed 7 years ago

shamilasallay commented 7 years ago

when uploading images, if the same image is uploaded again, it is not uploading.

ribizli commented 7 years ago

It is because input[type=file] change event is used to trigger the process. I should check if the input event do a better job in this respect.

ribizli commented 7 years ago

Ok, input event is not fired from file inputs, so we need to stay at change event, which firing only if selecting different file. I think one workaround would be to clear the value of the input after the file was processed.

But I don't really see the use case anyway: why to convert the same file twice?