我有将File对象序列化为Json的问题。
我使用Filereader上传文件,这会返回文件对象数组(fileList)。 然后我尝试将fileList序列化为JSON并将其ajax。但问题是:
JSON.stringify(fileList)
返回Firefox空数组。在Chrome上它运行正常。
数组中的那些文件对象没什么奇怪的。
File {
size: 75723,
type: "image/jpeg",
name: "title.jpg",
path: "",
lastModifiedDate: Date 2014-11-21T22:55:19.463Z,
mozFullPath:
"C:\title.jpg"
}
我如何JSON化它?