
You send requests for operations to happen, and get notified by callbacks. The asynchronous API doesn't give you data by returning values instead, you have to pass a callback function. The asynchronous API can be used in either the document or WebWorkers context, while the synchronous API is for use with WebWorkers only. In fact, they are almost alike, except for a few differences. Both versions of the API offer the same capabilities and features. The File and Directory Entries API comes with asynchronous and synchronous versions.

The client downloads attachments and stores them locally.The app can access partially downloaded files (so that you can watch the first chapter of your DVD, even if the app is still downloading the rest of the content or if the app didn't complete the download because you had to run to catch a train).The app can download large files (>1GB) for later viewing.The app can write to files in place (for example, overwriting just the ID3/EXIF tags and not the entire file).
#VUE DOWNLOAD FILE FROM API OFFLINE#
Audio or photo editor with offline access or local cache (great for performance and speed).The app pre-fetches assets in the background, so the user can go to the next task or game level without waiting for a download.The app downloads one or several large tarballs and expands them locally into a directory structure.Video game or other apps with lots of media assets.The app can restart uploads after an interruption, such as the browser being closed or crashing, connectivity getting interrupted, or the computer getting shut down.When a file or directory is selected for upload, you can copy the file into a local sandbox and upload a chunk at a time.

The following are just a few examples of how you can use the File and Directory Entries API: In Chrome, you can use the File and Directory Entries API with the Quota Management API, which lets you ask for more storage and manage your storage quota.However, AppCache storage isn't locally mutable, and doesn't allow for fine-grained client-side management. If you are targeting Chrome for your app and you want to store blobs, the File and Directory Entries API and App Cache are your only choices. While Firefox supports blob storage for IndexedDB, Chrome currently does not (Chrome is still implementing support for blob storage in IndexedDB).If you want to have large mutable chunks of data, the File and Directory Entries API is a much more efficient storage solution than a database. The File and Directory Entries API offers client-side storage for use cases that are not addressed by databases.

The API is a better choice for apps that deal with blobs for the following reasons: The File and Directory Entries API is an alternative to other storage APIs such as IndexedDB.
