2
I am trying to clean/reset after selecting new image.
After selecting image, clean Initial Preview
Follows the code:
HTML:
<input id="input-pd" name="input-pd[]" type="file" multiple class="file-loading">
JS:
$("#input-pd").fileinput({
    uploadUrl: "/file-upload-batch/1",
    uploadAsync: false,
    minFileCount: 2,
    maxFileCount: 2,
    overwriteInitial: false,
    initialPreview: [
        // IMAGE DATA
        "http://kartik-v.github.io/bootstrap-fileinput-samples/samples/Desert.jpg",
        // IMAGE DATA
        "http://kartik-v.github.io/bootstrap-fileinput-samples/samples/Lighthouse.jpg"
    ],
    initialPreviewAsData: true, // identify if you are sending preview data only and not the raw markup
    initialPreviewFileType: 'image', // image is the default and can be overridden in config below
    purifyHtml: true, // this by default purifies HTML data for preview
    uploadExtraData: {
        img_key: "1000",
        img_keywords: "happy, places",
    }
}).on('filesorted', function(e, params) {
    console.log('File sorted params', params);
}).on('fileuploaded', function(e, params) {
    console.log('File uploaded params', params);
});
    $('#input-pd').on('change', function(event) {
        $('#input-pd').fileinput('clear');
        $('#input-pd').fileinput('reset');
        //$('#input-edit').fileinput('refresh');
    });
Here it is in jsfiddle: https://jsfiddle.net/DTcHh/30077/
Some solution ?