0

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: Error displayed on Console when I dropped the file from Outlook App directly.

Murtaza
  • 308
  • 1
  • 3
  • 18
  • possible duplicate of [drag and drop email attachment file from Outlook to a web application](http://stackoverflow.com/questions/11221427/drag-and-drop-email-attachment-file-from-outlook-to-a-web-application) – Mosh Feu Aug 31 '15 at 08:08
  • See http://stackoverflow.com/questions/17184369/upload-fails-when-user-drags-and-drops-attachement-from-email-client/17197224#17197224 – Dmitry Streblechenko Sep 01 '15 at 06:11

0 Answers0