Does HTML5 allow you to interact with local client files from within a browser?



HTML5 allows us to interact with local client files (local client files are the files that are locally stored in the user’s computer). This is possible because HTML5 provides powerful APIs (Application Programming Interfaces) which are the interfaces with the help of which binary data and user’s local file system can be accessed. With the help of these file APIs, web applications can read files, file directory, can drag and drop from desktop to browser.

The following are the APIs that are used to access local client files −

  • File System API
  • File API
  • File Writer API

The following are some examples −

  • With the help of HTML5 file APIs, a thumbnail preview of images can be created when they are sent to the server to be saved there for future use.
  • HTML5 file APIs allow an app to save a file reference when a user is offline.
  • Images from the local drive can be accessed and get loaded into the browser through HTML5 File APIs.

Advertisements