3 ms·
Here's code I wrote a while ago that did exactly what I specified and worked in production on all major browsers: https://github.com/MediaCrush/MediaCrush/blob
by Sir_Cmpwn 10y ago
Here's code I wrote a while ago that did exactly what I specified and worked in production on all major browsers:
https://github.com/MediaCrush/MediaCrush/blob/master/scripts/home.coffee#L13 https://github.com/MediaCrush/MediaCrush/blob/master/scripts...
Here's the code in the jQuery library you linked to that does exactly this as well:
https://github.com/component/file-picker/blob/master/index.js#L76 https://github.com/component/file-picker/blob/master/index.j...
- drinchev 10y agoIt has some problems with input type=file elements. The devil is in the details, although obviously your code works for any other clickable elements. 1 : https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement/click https://developer.mozilla.org/en-US/docs/Web/API/HTMLElement... 2 : http://stackoverflow.com/questions/210643/in-javascript-can-i-make-a-click-event-fire-programmatically-for-a-file-input http://stackoverflow.com/questions/210643/in-javascript-can-...