1 (edited by kobi 2012-11-08 10:48:04)

Topic: disable drag & drop function while uploading files

Hi ,

I'm using the jquery.plupload.queue widget, my question is
how can I disable the drag & drop function after the upload
already started. It seems like the user can add files to the
drag & drop section while uploading and it uploads the files.
I tried canceling the event using the following code and it's not working.

Any ideas? thanks :)

$(document.body).bind("dragover", function(e) {
            e.preventDefault();
            return false;
       });

$(document.body).bind("drop", function(e){
            e.preventDefault();
            return false;
        });

Re: disable drag & drop function while uploading files

try using

var dropElm = document.getElementById(uploader.settings.drop_element);
plupload.removeEvent(dropElm, 'dragenter', up.id);
plupload.removeEvent(dropElm, 'dragover', up.id);
plupload.removeEvent(dropElm, 'drop', up.id);