4

I have problem with serialization of File object to Json.

Im using Filereader to upload the files and this returns array of file objects (fileList). Then i try to serialize fileList to JSON and ajax it. But the problem is that:

JSON.stringify(fileList)

returns on Firefox empty array. On Chrome it works fine.

Those file objects in array doesnt have anything strange.

File {
    size: 75723,
    type: "image/jpeg",
    name: "title.jpg",
    path: "",
    lastModifiedDate: Date 2014-11-21T22:55:19.463Z,
    mozFullPath:
    "C:\title.jpg"
}

How can I JSONify it?

JAAulde
  • 19,250
  • 5
  • 52
  • 63
piopix
  • 51
  • 1
  • 2
  • What exactly should be the output? You don't have to use JSON.stringify, you can create your JSON string by concatenating strings. – Ivan Kuckir Nov 21 '14 at 23:58

0 Answers0