I’ve use this piece of code to create a file dropper.
But it is not working in IE7+…. Like usual….
I get the error
SCRIPT5007: Unable to set value of the property ‘value’: object is null or undefined
Code on the line
files = e.originalEvent.target.files || e.originalEvent.dataTransfer.files;
for(i = 0; i < files.length; i += 1){
How can I get this working?
I know I can check if files is undefined, but then nothing happends. I want the file to get dropped.
Full support for the drag and drop API does not appear in Internet Explorer until version 10.
You will need to use feature detection to provide a sane fallback in earlier versions.