I am building an image-upload feature into a web application and am using the following event handler:
$('input:file').change(function(){
//handle input change
});
I have discovered that the handler is not called if I try to upload the same image twice, which makes sense because technically the input is not changing. But I am wondering, what needs to happen in order for the change to be triggered? Here are some examples of what I am looking for:
- Change of filename
- Change of file content regardless of filename
- Change of filetype
Which of these would cause a file to be received as a changed file? Or are there other scenarios as well?