I want to add a functionality in my Application which can accommodate a direct drag and drop from Outlook Email App. Current code supports drag and drop from desktop, but it doesn't supports it directly from Outlook Application. My target browser is Internet Explorer 9. My current POC looks like this:
var handleFileDrop = function (event) {
console.log("got file drop");
doNothing(event);
var formData = new FormData();
files = event.dataTransfer.files;
console.log(files[0].name);
formData.append("FILENAME", files[0]);
}
function doNothing(event)
{
//console.log("draggin");
event.stopPropagation();
event.preventDefault();
}
This is my HTML which I am binding it with the above event:
<div id="dropzone" style="border:1px solid; width:200px; height:50px;" onDrop="handleFileDrop(event)" onDragOver="doNothing(event)">
Drop file here
</div>
Following Error occurs, when I try to drag and drop directly from Outlook App: