Google-chrome – Disable open when file drag and dropped to web browser

google-chromeinternet explorer

When dragging and dropping files to Internet Explorer and Chrome, they both open the file that was dragged and dropped. I would like to disable this functionality so that the dragged and dropped file does not automatically open.

Is this a browser setting or a Windows setting?

Best Answer

I think this is what you are looking for...

 $( '#div_yourdroparea' ).bind( 'dragover',function(event) {
        event.stopPropagation();    
        event.preventDefault(); 
    });
    $( '#div_yourdroparea' ).bind( 'drop',function(event) {
     event.stopPropagation();   
      event.preventDefault();

    //your upload code goes here....
        }
Related Question