UPDATE The
actual problem turned out to be that if you try to drag images directly from one tab of the web browser to this drag and drop web interface, the event will fire, but the files will not be deleted. The responder noted this problem in OSX, and I was able to reproduce the same behavior in Windows 7.
HTML, , . ondragover/ondragenter , , , , . , drop .
, : http://jsfiddle.net/qey9G/4/
HTML
<div>
<div id="dropzone" style="margin:30px; width:500px; height:300px;
border:1px dotted grey;">
Drag & drop your file here...
</div>
</div>
JavaScript
var dropzone = document.getElementById("dropzone");
dropzone.ondragover = dropzone.ondragenter = function(event) {
event.stopPropagation();
event.preventDefault();
}
dropzone.ondrop= function drop(e)
{
e.stopPropagation();
e.preventDefault();
var dt = e.dataTransfer;
var files = dt.files;
alert(files.length);
}