$("#dropabe-element").fileDrop();
dragEnter: function(e) { /* do something */ }
dragEnter
is a usual function except for canceled browser default behavior.
default: function(){};
dragLeave: function(e) { /* do something */ }
dragLeave
is a usual function except for canceled browser default behavior.
default: function(){};
drop: function(files) { /* do something */ }
When dropped file at target element, jquery.filedrop.js call "Drop" function.
The first argument is Array of File
object.
Notice: It is not FileList
object because Array of File object is more convenient than FileList object.
default: function(){};
dropEach: function(file, valueOfFile) { /* do something */ }
When dropped file at target element, jquery.filedrop.js call "dropEach" function for each of dropped files.
This function uses FileReader
interface in background.
The first argument is File object.
If you dropped many files, this argument is equal to one of them.
The second argument is String
of dropped file.
Even if you dropped image file, directory, and other not readable files, this argument value is String of file.
default: function(){};