javascript - bootstrap fileinput uploads files with Chinese file names, and the file names only show the suffix
我想大声告诉你
我想大声告诉你 2017-05-18 10:51:10
0
1
1166

Version: bootstrap fileinput version 4.1.8
As shown in the picture:

Select the file 2.xlsx for non-resident users, it becomes 2.xlsx, and the Chinese is lost

How to solve it

oFile.Init = function(ctrlName, uploadUrl) {

            var control = $('#' + ctrlName);
             
            //初始化上传控件的样式
            control.fileinput({
                language: 'zh', //设置语言
                uploadUrl: uploadUrl, //上传的地址
                allowedFileExtensions: ['xlsx'],
                showUpload: true, //是否显示上传按钮
                showCaption: false,//是否显示标题
                browseClass: "btn btn-primary", //按钮样式 
                dropZoneEnabled: false,//是否显示拖拽区域
                
                maxFileCount: 1, //表示允许同时上传的最大文件个数
                enctype: 'multipart/form-data',
                validateInitialCount:true,
                previewFileIcon: "<i class='glyphicon glyphicon-king'></i>",
                msgFilesTooMany: "选择上传的文件数量({n}) 超过允许的最大数值{m}!",
                uploadExtraData: function() {
                    return {"imageFileName":fodderType()};
               }
            });
我想大声告诉你
我想大声告诉你

reply all(1)
黄舟

Master, I am in the same situation as you. How did you solve it in the end

Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template