$("#fileupload_input_factor").fileinput({
language : 'zh',
uploadUrl : contextpath + "/rest/pollutionburining/burninguploadfile?status="+status+"&source="+source,
enctype : 'multipart/form-data',
// 隐藏文件预览缩略图
showPreview : false,
// 隐藏上传按钮
showUpload : true,
// 显示标题
showCaption : true,
// 预加载说明
initialCaption : "上传贡献文件",
// 只能选择{text类型}
allowedPreviewTypes : [ 'txt'],
// 只能上传一下类型文件
allowedFileExtensions : [ "txt"],
// 报错样式
previewClass : "bg-warning",
maxFileSize : 2000,
window:true,
});
// 上传回调
$("#fileupload_input_factor").on("fileuploaded", funct
bootstrap-fileinput 文件上传
最新推荐文章于 2024-03-23 21:41:48 发布
这段内容展示了如何使用bootstrap-fileinput插件进行文件上传的配置。设置包括上传URL、支持的语言、隐藏预览和上传按钮,指定允许的文件类型和大小,并处理上传后的回调,检查返回消息并刷新表格。
摘要由CSDN通过智能技术生成