Many apps inevitably need to transfer files to or from a server. An app that stores photos in the cloud will need to upload files from the user's app. If the user needs to edit these files, then they will need to be downloaded again to the client. While XMLHttpRequest or Web Sockets can be used for this, Cordova supplies a core plugin that is made specifically for large file transfers: the "file transfer" plugin.
In this chapter, we'll cover the following:
Configuring the whitelist
Downloading files from a server
Receiving files using PHP on a server
Uploading files to a server
Monitoring the progress
Aborting transfers
Security concerns