Unload plupload from div

I use plupload with

$("#plupload_div").pluploadQueue({
        // General settings
        runtimes : 'flash,html5',
        url : '/products/save_photo',
        max_file_size : '10mb',
        //chunk_size : '1mb',
        unique_names : true,   
        resize : {width : 558, height : 418, quality : 90},     
        multipart: true,        
        multipart_params : {"photo[variant_id]" : variant_id, authenticity_token : atoken},        
        filters : [ {title : "Image files", extensions : "jpg,gif,png"}],        
        flash_swf_url : '/javascripts/plupload.flash.swf',        
      });

What do I need to do to unload plupload from the #plupload_div element?

+3
source share
3 answers
$('#plupload_div').unbind();

Does it help?

calling unbind () without args removes all handlers attached to elements

+2
source

You can do it as follows:

var uploader = $("#plupload_div").pluploadQueue(); 
uploader.destroy();
$("#plupload_div").remove();

This will cancel all events and remove the Plupload structure from the page.

Plupload - API- Plupload Core, ( jQuery UI Themes), ( ) , :

$("#plupload_div").plupload('destroy');
+11

uploader.destroy (); enough to handle it

+1
source

Source: https://habr.com/ru/post/1790975/


All Articles