[英]How to get the Uploaded file name in php if the file is uploaded by using ajax jquery file upload
[英]How to get the uploaded file name with jquery-filedrop?
任何熟悉jquery-filedrop的人 。 我想用jquery-filedrop获取文件名。
在filedrop中如何获取上传的文件名? 因为我想在文件上传后显示名称。
这是我的模板代码
var template = '<div class="preview">'+
'<span class="imageHolder">'+
'<img />'+
'<span class="uploaded"></span>'+
'</span>'+
'<div class="progressHolder">'+
'<div class="progress"></div>+
'</div>'+
'<div class="name">'+file.name+'</div>'+
'</div>';
我使用file.name,但它不起作用。 控制台显示:
未捕获的ReferenceError:文件未定义
为什么?
谢谢!
尝试
files[0].filename
根据上传的文件数,索引将更改
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.