Bootstrap File Input

796 views Asked by At

I'm using "Bootstrap File Input" -

http://plugins.krajee.com/file-input

each time I browser and choose file the old file that i already chose auto removed from the preview section. how can i fix that?

$(document).on('ready', function() {
    $("#input-8").fileinput({
        rtl: true,
        language: "he",
        allowedFileExtensions: [<?PHP echo VALID_IMG_FILES2 ?>],
        maxFileCount: <?PHP echo MAX_UPLOAD_FILES ?>,
        maxFilePreviewSize: 5120, // 5 MB
        maxImageWidth: 150,
        maxImageHeight: 100,
        resizePreference: 'height',
        resizeImage: true,
        theme: "explorer",
        validateInitialCount: true,
    //  uploadUrl: "/file-upload-batch/2",
        showRemove: false,
        showUpload: false,
        required: true,
        overwriteInitial: false,
        initialPreviewAsData: true,
        layoutTemplates: {
            main1: "{preview}\n" +
            "<div class=\'input-group {class}\'>\n" +
            "   <div class=\'input-group-btn\'>\n" +
            "       {browse}\n" +
            "       {upload}\n" +
            "       {remove}\n" +
            "   </div>\n" +
            "   {caption}\n" +
            "</div>"
        }       
    });
});
0

There are 0 answers