upload.render({
elem: '#chooseFile'
,url: localStorage.getItem('url') + '/upload/upload/file_upload'
,accept: 'video' //视频
,choose: function(obj){
var files = obj.pushFile();
console.log(files)
}
,progress: function(e , percent) {
console.log("进度:" + percent + '%');
element.progress('progressBar',percent + '%');
}
,done: function(res){
console.log(res)
$("#fileName").val(res.data);
}
});

此下代码就是获取关键

layui的文件上传功能获取文件名_layui的文件上传获取文件名

如果帮你解决问题,请关注一下小编