如何将文件对象设置为HTML格式的输入文件?
问题描述:
我想将我上传的文件对象设置为另一个文件对象
I want to set file object which i had uploaded into another
<input type='file' name="file" id="fileid" />
我也尝试过使用
$("#fileid").attr("files",fileObject);
但它不起作用。有没有其他解决方案将文件对象设置为表单输入字段?
but it doesn't work. Is there any other solution to set file object into form input field??
答
这是可能的,因为我已经使用angularJS 。
以前的文件内容在特定情况下很少发布空白,现在它不会发送使用angularjs和更新的FORMDATA()注入的空白数据。
It's possible as i had fixed this issue using angularJS. Earlier file content are posted blank rarely with particular situation, Now it will not send blank data which are injected with angularjs and updated FORMDATA().