file

< apis
Jump to: navigation, search

file

This article is Ready to Use.

W3C Working Draft

Summary

The File API allows a developer to use javascript to access the contents and local path of a file uploaded from the input file widget. This enables the developer to build a javascript frontend that allows the website to show a preview of the file uploaded. By using the File API, the developer can also enable a user to upload files via drag-and-drop. Prior to the File API, functionalities like these can only be accomplished via Flash or other plugins.


API Name Summary
Blob The Blob object represents immutable raw data. It provides a method to slice data objects between ranges of bytes into further chunks of raw data.
File The File object provides information about files stored on the user's computer, and access to their contents. These are generally retrieved from a FileList object returned when a user selects files using the input element, or from a drag-and-drop operation's DataTransfer object.
FileError Represents an error that occurs while using the FileReader interface.

Obsolete per latest specification. Use DOMError instead.

FileReaderSync Allows for synchronous reading of File or Blob objects. Only available in Workers, as synchronous I/O would otherwise block the main application from executing.
MSStreamError The MSStreamError object reports file-related errors asynchronously.

Obsolete per latest specification. Use DOMError instead.

MSStreamReader Creates random access data (Blob) from an MSStream object.
ObjectURLOptions Provides the oneTimeOnly property for use with the createObjectURL method.
URL A static object for URL related utility operations.




See also

Related articles

Off-line Storage



  • file