Welcome to WebmasterWorld Guest from 54.163.49.19

Forum Moderators: open

Message Too Old, No Replies

Upload the same file

     
5:16 am on Jun 8, 2014 (gmt 0)

Junior Member

5+ Year Member Top Contributors Of The Month

joined:Mar 1, 2010
posts: 194
votes: 0


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 [jsfiddle.net]'s my approach to resolve the issue. I wonder if there's a neater way to achieve it.
5:49 am on June 8, 2014 (gmt 0)

Junior Member

5+ Year Member Top Contributors Of The Month

joined:Mar 1, 2010
posts: 194
votes: 0


Update

This one seems more semantic to me: [jsfiddle.net...]
9:36 am on June 8, 2014 (gmt 0)

Junior Member

5+ Year Member Top Contributors Of The Month

joined:Mar 1, 2010
posts: 194
votes: 0


Last update:

This one works well in IE11: [jsfiddle.net...]