0

我正在使用“引导文件输入”-

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

每次我浏览并选择文件时,我已经选择的旧文件会自动从预览部分中删除。我该如何解决?

$(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>"
        }       
    });
});
4

0 回答 0