Questions tagged [fileapi]

Use this tag for questions related to the W3C File API. The W3C File API specifies how file objects should be represented and how their properties should be accessed.

The W3C File API at https://w3c.github.io/FileAPI/ specifies how file objects should be represented and how their properties should be accessed.

The File API spec includes the following interfaces:

  • Blob - raw binary data. Blob objects can be created via the Blob() constructor, but their properties are read-only.
  • File - a specific type of Blob with additional read-only properties.
  • FileList - a collection of File objects.
  • FileReader - provides asynchronous access to a content of a Blob or File object.

Related Tags

Resources

532 questions
40
votes
2 answers

Failed to construct 'File': Iterator getter is not callable in chrome 60 when use JSON.stringify()

System Configuration : macOS Sierra 10.12.5 ; chrome 60; I am trying to download JSON data ( response object ) as a json file but when I tried to achive this using browser File() object , it gives error Failed to construct 'File': Iterator getter…
xkeshav
  • 53,360
  • 44
  • 177
  • 245
40
votes
5 answers

HTML5 File API: How to see the result of readAsText()

When readAsText() function is completed the result is stored in .result How do I see if the content of the file read are correct in .result? fr = new FileReader(); fr.readAsText(file); var x = fr.result; console.log(x); //does not display…
user32262
  • 8,660
  • 21
  • 64
  • 77
40
votes
6 answers

Large file upload with WebSocket

I'm trying to upload large files (at least 500MB, preferably up to a few GB) using the WebSocket API. The problem is that I can't figure out how to write "send this slice of the file, release the resources used then repeat". I was hoping I could…
Vlad Ciobanu
  • 1,473
  • 1
  • 11
  • 11
35
votes
9 answers

Reading multiple files with Javascript FileReader API one at a time

I'm using the FileReader API to read multiple files.