Brilliant JavaScript file upload function

I’ve seen various attempts to use JavaScript to customise the file upload button. The browsers historically do not lend themselves to making this easy to achieve due to security considerations – the idea is not to make it simple for anyone to upload a file from the PC to a remote website without the user knowing about it. However, the problem is that from a UI perspective, you are stuck with what the browser supplies.

All the attempts I’ve seen to try and hack the browser file upload input tag have been quite bad. They mostly involve trying to put some other element over the browser created button, catching clicks on that element and then forwarding them to the original button. The mileage for this method varies with the browser used and also requires creating your specific image to cover the button, which gets tiresome if you want to change languages or colours.

Enter upload-at-click. A brilliant piece of work that works with every browser (even including IE6 !). Take a look at it and you’ll see why I’m impressed.

Leave a Reply

Your email address will not be published. Required fields are marked *