我有一个文件对象列表,如:
var files = [File, File, File]
我想将其转换为:
我有一个文件字段,我想将files
映射为FileList
对象。
var uploading_files = {}
files.forEach(function(file, key) {
uploading_files[key] = file
})
var uploader = document.getElementById('uploader')
uploader.files = uploading_files
console.log(uploader.files)
但它没有给我FileList
个对象?
如何创建文件列表objecdt?
提前谢谢..