O'Reilly logo

PhoneGap Essentials by Ivan Turkovic

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

File Transfer

The File Transfer plugin enables you to download uploaded files from your server. It is used together with media content capability to upload to your server without interrupting your main thread. File Transfer provides a way to upload HTTP multi-part POST requests.

To install the plugin, you need to run the following command:

phonegap plugin add cordova-plugin-file-transfer

The File Transfer plugin will make available two global objects—FileTransfer and FileUploadOptions—that will be available after the deviceready event has been fired. We are going to describe them in detail in the following paragraphs:

document.addEventListener("deviceready", function() {
   console.log(FileTransfer);
}, false);

Examples for this plugin need to have ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required