Upload the same file

You cannot select and upload the same file except in Firefox, which mistakenly allows you to do so:

<input type="file" id="fileChooser">
document.getElementById('fileChooser').onchange = function () {
    alert('Uploaded!');
};

Here’s my approach to resolve the issue. I wonder if there’s a neater way to achieve it.

Update:

This one works well in IE11: demo.