Added: cordova/site/public/docs/en/6.x/cordova-plugin-file-transfer/index.html URL: http://svn.apache.org/viewvc/cordova/site/public/docs/en/6.x/cordova-plugin-file-transfer/index.html?rev=1734016&view=auto ============================================================================== --- cordova/site/public/docs/en/6.x/cordova-plugin-file-transfer/index.html (added) +++ cordova/site/public/docs/en/6.x/cordova-plugin-file-transfer/index.html Tue Mar 8 01:36:30 2016 @@ -0,0 +1,3063 @@ +<!DOCTYPE html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1"> + <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> + <meta name="format-detection" content="telephone=no"> + <meta name="viewport" content="user-scalable=no, initial-scale=1, maximum-scale=1, minimum-scale=1, width=device-width" /> + <meta name="description" content=" "> + + <title> + + Apache Cordova + + </title> + + <link rel="SHORTCUT ICON" href="/favicon.ico"/> + <link rel="canonical" href="https://cordova.apache.org/docs/en/6.x/cordova-plugin-file-transfer/"> + + <!-- CSS --> + <link rel="stylesheet" type="text/css" href="/static/css/main.css"> + + + <link rel="stylesheet" type="text/css" href="/static/js/lib/prettify/prettify.css"> + + + <!-- HTML5 shim and Respond.js for IE8 support of HTML5 elements and media queries --> + <!--[if lt IE 9]> + <script src="https://oss.maxcdn.com/html5shiv/3.7.2/html5shiv.min.js"></script> + <script src="https://oss.maxcdn.com/respond/1.4.2/respond.min.js"></script> + <![endif]--> + <script type="text/javascript"> + var disqus_developer = 1; // this would set it to developer mode + </script> + + <!-- JS --> + <script defer type="text/javascript" src="/static/js/lib/jquery-2.1.1.min.js"></script> + <script defer type="text/javascript" src="/static/js/lib/bootstrap.min.js"></script> + <script defer type="text/javascript" src="/static/js/lib/ZeroClipboard.js"></script> +</head> + +<body> + <header> + <a class="scroll-point pt-top" name="top"></a> + <nav class="navbar navbar-inverse navbar-fixed-top"> + <div class="container-fluid"> + <div class="navbar-header"> + <button type="button" class="navbar-toggle collapsed" data-toggle="collapse" data-target="#navbar" aria-expanded="false" aria-controls="navbar"> + <span class="sr-only">Toggle navigation</span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + <span class="icon-bar"></span> + </button> + <a class="navbar-brand" href="/"><img id="logo_top" src="/static/img/cordova-logo-newbrand.svg"/></a> + </div> + <div id="navbar" class="navbar-collapse collapse"> + <div class="nav_bar_center"> + <ul class="nav navbar-nav"> + <li class="active"> + <a href="/docs/en/latest/guide/overview/">Documentation</a> + </li> + <li > + <a href="/plugins">Plugins</a> + </li> + <li > + <a href="/blog" id="blog_button">Blog<span class="badge" id="new_blog_count"></span></a> + </li> + <li > + <a href="/contribute">Contribute</a> + </li> + <li> + <a href="/#getstarted">Get Started</a> + </li> + </ul> + <form action="https://www.google.com/search" method="GET" class="navbar-form navbar-right" id="header-search-form" role="search"> + <div class="input-group"> + <input type="text" name="q" class="form-control hidden-sm" placeholder="Site-wide Search"> + <span class="input-group-btn"> + <button type="submit" class="btn search-button"> + <span class="glyphicon glyphicon-search" aria-hidden="true"></span> + </button> + </span> + </div> + <input type="hidden" name="q" value="site:cordova.apache.org"> + </form> + </div> + </div><!--/.navbar-collapse --> + </div> + </nav> + <div id="_fixed_navbar_spacer" style="padding-top:50px"></div> +</header> + + <!-- Use the manual ToC, and if it doesn't exist, use the generated one --> + + + + + + + + + + + + +<div class="docs container"> + + <!-- Table of Contents --> + <div class="hidden-xs hidden-sm col-md-3 site-toc-container"> + <h2 class="site-toc-title">Table of Contents</h2> + <ul class="site-toc"> + + + + + + + + <li> + + <span class="toc-section-heading"> + Introduction + </span> + + + + + + + <ul class="site-toc"> + + + + + + <li> + + <a class="" href="../guide/overview/index.html"> + Overview + </a> + + + + + + + </li> + +</ul> + + + </li> + + + + + + + + <li> + + <span class="toc-section-heading"> + Create apps + </span> + + + + + + + <ul class="site-toc"> + + + + + + <li> + + <a class="" href="../guide/cli/index.html"> + Create your first app + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../guide/support/index.html"> + Platform support + </a> + + + + + + + </li> + + + + + + + + <li> + + <span class="toc-section-heading"> + Develop for platforms + </span> + + + + + + + <ul class="site-toc"> + + + + + + <li> + + <a class="" href="../guide/platforms/android/index.html"> + Android + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../guide/platforms/blackberry10/home.html"> + Blackberry 10 + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../guide/platforms/ios/index.html"> + iOS + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../guide/platforms/osx/index.html"> + OS X + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../guide/platforms/ubuntu/index.html"> + Ubuntu + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../guide/platforms/win8/index.html"> + Windows + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../guide/platforms/wp8/home.html"> + WP8 + </a> + + + + + + + </li> + +</ul> + + + </li> + + + + + + <li> + + <a class="" href="../platform_plugin_versioning_ref/index.html"> + Manage versions and platforms + </a> + + + + + + + </li> + + + + + + + + + + + <li> + + <a class="" href="../config_ref/images.html"> + Customize icons + </a> + + + + + + + </li> + + + + + + + + + + + <li> + + <a class="" href="../cordova/storage/storage.html"> + Store data + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../guide/appdev/privacy/index.html"> + Manage privacy + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../guide/appdev/security/index.html"> + Manage security + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../guide/appdev/whitelist/index.html"> + Whitelisting + </a> + + + + + + + </li> + + + + + + +</ul> + + + </li> + + + + + + + + <li> + + <span class="toc-section-heading"> + Create plugins + </span> + + + + + + + <ul class="site-toc"> + + + + + + <li> + + <a class="" href="../guide/hybrid/plugins/index.html"> + Create a plugin + </a> + + + + + + + </li> + + + + + + + + + + + + + <li> + + <span class="toc-section-heading"> + Develop for platforms + </span> + + + + + + + <ul class="site-toc"> + + + + + + <li> + + <a class="" href="../guide/platforms/android/plugin.html"> + Android + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../guide/platforms/blackberry10/plugin.html"> + Blackberry 10 + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../guide/platforms/ios/plugin.html"> + iOS + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../guide/platforms/win8/plugin.html"> + Windows + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../guide/platforms/wp8/plugin.html"> + WP8 + </a> + + + + + + + </li> + +</ul> + + + </li> + + + + + + <li> + + <a class="" href="../plugin_ref/plugman.html"> + Use Plugman + </a> + + + + + + + </li> + + + + + + +</ul> + + + </li> + + + + + + + + <li> + + <span class="toc-section-heading"> + Advanced Topics + </span> + + + + + + + <ul class="site-toc"> + + + + + + <li> + + <a class="" href="../guide/hybrid/webviews/index.html"> + Embed Cordova in native apps + </a> + + + + + + + </li> + + + + + + + + + + + <li> + + <a class="" href="../guide/next/index.html"> + Next Steps + </a> + + + + + + + </li> + +</ul> + + + </li> + + + + + + + + <li> + + <span class="toc-section-heading"> + Reference + </span> + + + + + + + <ul class="site-toc"> + + + + + + <li> + + <a class="" href="../config_ref/index.html"> + Config.xml + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../cordova/events/events.html"> + Events + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../cordova-cli/index.html"> + CLI + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../guide/appdev/hooks/index.html"> + Hooks + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../plugin_ref/spec.html"> + Plugin.xml + </a> + + + + + + + </li> + + + + + + + + <li> + + <span class="toc-section-heading"> + Plugin APIs + </span> + + + + + + + <ul class="site-toc"> + + + + + + <li> + + <a class="" href="../cordova-plugin-battery-status/index.html"> + Battery Status + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../cordova-plugin-camera/index.html"> + Camera + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../cordova-plugin-console/index.html"> + Console + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../cordova-plugin-contacts/index.html"> + Contacts + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../cordova-plugin-device/index.html"> + Device + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../cordova-plugin-device-motion/index.html"> + Device Motion + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../cordova-plugin-device-orientation/index.html"> + Device Orientation + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../cordova-plugin-dialogs/index.html"> + Dialogs + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../cordova-plugin-file/index.html"> + File + </a> + + + + + + + </li> + + + + + + <li> + + <a class="this-page" href="../cordova-plugin-file-transfer/index.html"> + File Transfer + </a> + + + + <div id="page-toc" class="page-toc"></div> + + + </li> + + + + + + <li> + + <a class="" href="../cordova-plugin-geolocation/index.html"> + Geolocation + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../cordova-plugin-globalization/index.html"> + Globalization + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../cordova-plugin-inappbrowser/index.html"> + Inappbrowser + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../cordova-plugin-media/index.html"> + Media + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../cordova-plugin-media-capture/index.html"> + Media Capture + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../cordova-plugin-network-information/index.html"> + Network Information + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../cordova-plugin-splashscreen/index.html"> + Splashscreen + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../cordova-plugin-vibration/index.html"> + Vibration + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../cordova-plugin-statusbar/index.html"> + Statusbar + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../cordova-plugin-whitelist/index.html"> + Whitelist + </a> + + + + + + + </li> + + + + + + <li> + + <a class="" href="../cordova-plugin-legacy-whitelist/index.html"> + Legacy Whitelist + </a> + + + + + + + </li> + +</ul> + + + </li> + +</ul> + + + </li> + + + + + + +</ul> + + </div> + + <!-- Page content --> + <div class="col-md-8 col-md-offset-1"> + + <!-- ToC Dropdown (for XS and SM sizes only) --> + <div class="toc-dropdown content-header visible-xs-block visible-sm-block"> + <div class="dropdown"> + <button class="btn btn-default dropdown-toggle" type="button" id="tocDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> + Table of Contents + <span class="caret"></span> + </button> + <ul class="dropdown-menu"> + + + + + +<li> + <a class="" href="../guide/overview/index.html"> + Overview + </a> +</li> + + + + + + + + + + +<li> + <a class="" href="../guide/cli/index.html"> + Create your first app + </a> +</li> + + + + +<li> + <a class="" href="../guide/support/index.html"> + Platform support + </a> +</li> + + + + + + + +<li> + <a class="" href="../guide/platforms/android/index.html"> + Android + </a> +</li> + + + + +<li> + <a class="" href="../guide/platforms/blackberry10/home.html"> + Blackberry 10 + </a> +</li> + + + + +<li> + <a class="" href="../guide/platforms/ios/index.html"> + iOS + </a> +</li> + + + + +<li> + <a class="" href="../guide/platforms/osx/index.html"> + OS X + </a> +</li> + + + + +<li> + <a class="" href="../guide/platforms/ubuntu/index.html"> + Ubuntu + </a> +</li> + + + + +<li> + <a class="" href="../guide/platforms/win8/index.html"> + Windows + </a> +</li> + + + + +<li> + <a class="" href="../guide/platforms/wp8/home.html"> + WP8 + </a> +</li> + + + + + + + +<li> + <a class="" href="../platform_plugin_versioning_ref/index.html"> + Manage versions and platforms + </a> +</li> + + + + + + + +<li> + <a class="" href="../config_ref/images.html"> + Customize icons + </a> +</li> + + + + + + + +<li> + <a class="" href="../cordova/storage/storage.html"> + Store data + </a> +</li> + + + + +<li> + <a class="" href="../guide/appdev/privacy/index.html"> + Manage privacy + </a> +</li> + + + + +<li> + <a class="" href="../guide/appdev/security/index.html"> + Manage security + </a> +</li> + + + + +<li> + <a class="" href="../guide/appdev/whitelist/index.html"> + Whitelisting + </a> +</li> + + + + + + + + + + + + + +<li> + <a class="" href="../guide/hybrid/plugins/index.html"> + Create a plugin + </a> +</li> + + + + + + + + + + +<li> + <a class="" href="../guide/platforms/android/plugin.html"> + Android + </a> +</li> + + + + +<li> + <a class="" href="../guide/platforms/blackberry10/plugin.html"> + Blackberry 10 + </a> +</li> + + + + +<li> + <a class="" href="../guide/platforms/ios/plugin.html"> + iOS + </a> +</li> + + + + +<li> + <a class="" href="../guide/platforms/win8/plugin.html"> + Windows + </a> +</li> + + + + +<li> + <a class="" href="../guide/platforms/wp8/plugin.html"> + WP8 + </a> +</li> + + + + + + + +<li> + <a class="" href="../plugin_ref/plugman.html"> + Use Plugman + </a> +</li> + + + + + + + + + + + + + +<li> + <a class="" href="../guide/hybrid/webviews/index.html"> + Embed Cordova in native apps + </a> +</li> + + + + + + + +<li> + <a class="" href="../guide/next/index.html"> + Next Steps + </a> +</li> + + + + + + + + + + +<li> + <a class="" href="../config_ref/index.html"> + Config.xml + </a> +</li> + + + + +<li> + <a class="" href="../cordova/events/events.html"> + Events + </a> +</li> + + + + +<li> + <a class="" href="../cordova-cli/index.html"> + CLI + </a> +</li> + + + + +<li> + <a class="" href="../guide/appdev/hooks/index.html"> + Hooks + </a> +</li> + + + + +<li> + <a class="" href="../plugin_ref/spec.html"> + Plugin.xml + </a> +</li> + + + + + + + +<li> + <a class="" href="../cordova-plugin-battery-status/index.html"> + Battery Status + </a> +</li> + + + + +<li> + <a class="" href="../cordova-plugin-camera/index.html"> + Camera + </a> +</li> + + + + +<li> + <a class="" href="../cordova-plugin-console/index.html"> + Console + </a> +</li> + + + + +<li> + <a class="" href="../cordova-plugin-contacts/index.html"> + Contacts + </a> +</li> + + + + +<li> + <a class="" href="../cordova-plugin-device/index.html"> + Device + </a> +</li> + + + + +<li> + <a class="" href="../cordova-plugin-device-motion/index.html"> + Device Motion + </a> +</li> + + + + +<li> + <a class="" href="../cordova-plugin-device-orientation/index.html"> + Device Orientation + </a> +</li> + + + + +<li> + <a class="" href="../cordova-plugin-dialogs/index.html"> + Dialogs + </a> +</li> + + + + +<li> + <a class="" href="../cordova-plugin-file/index.html"> + File + </a> +</li> + + + + +<li> + <a class="this-page" href="../cordova-plugin-file-transfer/index.html"> + File Transfer + </a> +</li> + + + + +<li> + <a class="" href="../cordova-plugin-geolocation/index.html"> + Geolocation + </a> +</li> + + + + +<li> + <a class="" href="../cordova-plugin-globalization/index.html"> + Globalization + </a> +</li> + + + + +<li> + <a class="" href="../cordova-plugin-inappbrowser/index.html"> + Inappbrowser + </a> +</li> + + + + +<li> + <a class="" href="../cordova-plugin-media/index.html"> + Media + </a> +</li> + + + + +<li> + <a class="" href="../cordova-plugin-media-capture/index.html"> + Media Capture + </a> +</li> + + + + +<li> + <a class="" href="../cordova-plugin-network-information/index.html"> + Network Information + </a> +</li> + + + + +<li> + <a class="" href="../cordova-plugin-splashscreen/index.html"> + Splashscreen + </a> +</li> + + + + +<li> + <a class="" href="../cordova-plugin-vibration/index.html"> + Vibration + </a> +</li> + + + + +<li> + <a class="" href="../cordova-plugin-statusbar/index.html"> + Statusbar + </a> +</li> + + + + +<li> + <a class="" href="../cordova-plugin-whitelist/index.html"> + Whitelist + </a> +</li> + + + + +<li> + <a class="" href="../cordova-plugin-legacy-whitelist/index.html"> + Legacy Whitelist + </a> +</li> + + + + + + + + + + + + + + </ul> + </div> + </div> + + <div class="content-header"> + + <a class="edit" href="https://github.com/apache/cordova-plugin-file-transfer/blob/master/README.md"> + <span class="glyphicon glyphicon-pencil" aria-hidden="true"></span> Edit + </a> + + <!-- Language dropdown --> + <div class="dropdown"> + <button class="btn btn-default dropdown-toggle" type="button" id="languageDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> + English + <span class="caret"></span> + </button> + + <!-- List all languages --> + <ul class="dropdown-menu" aria-labelledby="languageDropdown"> + + + + + + + + + + + + + + <li> + <a href="/docs/de/6.x/cordova-plugin-file-transfer/index.html" class=" + + + " + > + + Deutsch + + </a> + </li> + + + + + + + + + + + + + + <li> + <a href="/docs/en/6.x/cordova-plugin-file-transfer/index.html" class=" + + + " + > + + <span class="selected"> + English + </span> + + </a> + </li> + + + + + + + + + + + + + + <li> + <a href="/docs/es/6.x/cordova-plugin-file-transfer/index.html" class=" + + + " + > + + Español + + </a> + </li> + + + + + + + + + + + + + + <li> + <a href="/docs/fr/6.x/cordova-plugin-file-transfer/index.html" class=" + + + " + > + + Français + + </a> + </li> + + + + + + + + + + + + + + <li> + <a href="/docs/it/6.x/cordova-plugin-file-transfer/index.html" class=" + + + " + > + + Italiano + + </a> + </li> + + + + + + + + + + + + + + <li> + <a href="/docs/ja/6.x/cordova-plugin-file-transfer/index.html" class=" + + + " + > + + æ¥æ¬èª + + </a> + </li> + + + + + + + + + + + + + + <li> + <a href="/docs/ko/6.x/cordova-plugin-file-transfer/index.html" class=" + + + " + > + + íêµì´ + + </a> + </li> + + + + + + + + + + + + + + <li> + <a href="/docs/pl/6.x/cordova-plugin-file-transfer/index.html" class=" + + + " + > + + Polski + + </a> + </li> + + + + + + + + + + + + + + <li> + <a href="/docs/ru/6.x/cordova-plugin-file-transfer/index.html" class=" + + + " + > + + Ð ÑÑÑкий + + </a> + </li> + + + + + + + + + + + + + + <li> + <a href="/docs/sl/6.x/cordova-plugin-file-transfer/index.html" class=" + + + " + > + + Slovene + + </a> + </li> + + + + + + + + + + + + + + <li> + <a href="/docs/zh/6.x/cordova-plugin-file-transfer/index.html" class=" + + + " + > + + æ±è¯ + + </a> + </li> + + </ul> + </div> + + <!-- Version dropdown --> + <div class="dropdown"> + <button class="btn btn-default dropdown-toggle" type="button" id="versionDropdown" data-toggle="dropdown" aria-haspopup="true" aria-expanded="true"> + 6.x + + (Latest) + + <span class="caret"></span> + </button> + <ul class="dropdown-menu" aria-labelledby="versionDropdown"> + + <!-- List versions available in this language --> + + <li> + + + + + + + + + <a href="/docs/en/dev/cordova-plugin-file-transfer/index.html"> + + + dev + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/6.x/cordova-plugin-file-transfer/index.html"> + + <span class="selected"> + + 6.x + + (Latest) + + + </span> + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/5.4.0/cordova-plugin-file-transfer/index.html"> + + + 5.4.0 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/5.1.1/cordova-plugin-file-transfer/index.html"> + + + 5.1.1 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/5.0.0/cordova-plugin-file-transfer/index.html"> + + + 5.0.0 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/4.0.0/cordova-plugin-file-transfer/index.html"> + + + 4.0.0 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/3.6.0/cordova-plugin-file-transfer/index.html"> + + + 3.6.0 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/3.5.0/cordova-plugin-file-transfer/index.html"> + + + 3.5.0 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/3.4.0/cordova-plugin-file-transfer/index.html"> + + + 3.4.0 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/3.3.0/cordova-plugin-file-transfer/index.html"> + + + 3.3.0 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/3.2.0/cordova-plugin-file-transfer/index.html"> + + + 3.2.0 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/3.1.0/cordova-plugin-file-transfer/index.html"> + + + 3.1.0 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/3.0.0/cordova-plugin-file-transfer/index.html"> + + + 3.0.0 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/2.9.0/cordova-plugin-file-transfer/index.html"> + + + 2.9.0 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/2.8.0/cordova-plugin-file-transfer/index.html"> + + + 2.8.0 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/2.7.0/cordova-plugin-file-transfer/index.html"> + + + 2.7.0 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/2.6.0/cordova-plugin-file-transfer/index.html"> + + + 2.6.0 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/2.5.0/cordova-plugin-file-transfer/index.html"> + + + 2.5.0 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/2.4.0/cordova-plugin-file-transfer/index.html"> + + + 2.4.0 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/2.3.0/cordova-plugin-file-transfer/index.html"> + + + 2.3.0 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/2.2.0/cordova-plugin-file-transfer/index.html"> + + + 2.2.0 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/2.1.0/cordova-plugin-file-transfer/index.html"> + + + 2.1.0 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/2.0.0/cordova-plugin-file-transfer/index.html"> + + + 2.0.0 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/1.9.0/cordova-plugin-file-transfer/index.html"> + + + 1.9.0 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/1.8.1/cordova-plugin-file-transfer/index.html"> + + + 1.8.1 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/1.8.0/cordova-plugin-file-transfer/index.html"> + + + 1.8.0 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/1.7.0/cordova-plugin-file-transfer/index.html"> + + + 1.7.0 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/1.6.1/cordova-plugin-file-transfer/index.html"> + + + 1.6.1 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/1.6.0/cordova-plugin-file-transfer/index.html"> + + + 1.6.0 + + + + </a> + </li> + + <li> + + + + + + + + + <a href="/docs/en/1.5.0/cordova-plugin-file-transfer/index.html"> + + + 1.5.0 + + + + </a> + </li> + + </ul> + </div> + </div> + + <!-- Get URL for this page in the latest version --> + + + + + <!-- Show warnings for special versions (i.e. non-latest, and dev) --> + + + + <div class="alert alert-warning docs-alert" role="alert"> + <button type="button" class="close" data-dismiss="alert" aria-label="Close"> + <span aria-hidden="true">×</span> + </button> + This documentation describes this plugin at version master. + <a href="https://github.com/apache/cordova-plugin-file-transfer/releases"> + Other versions are on GitHub. + </a> + </div> + + + + <div id="page-toc-source"> + <!-- +# license: Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you under the Apache License, Version 2.0 (the +# "License"); you may not use this file except in compliance +# with the License. You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, +# software distributed under the License is distributed on an +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY +# KIND, either express or implied. See the License for the +# specific language governing permissions and limitations +# under the License. +--> + +<p><a href="https://travis-ci.org/apache/cordova-plugin-file-transfer"><img src="https://travis-ci.org/apache/cordova-plugin-file-transfer.svg?branch=master" alt="Build Status"></a></p> + +<h1>cordova-plugin-file-transfer</h1> + +<p>This plugin allows you to upload and download files.</p> + +<p>This plugin defines global <code class="prettyprint">FileTransfer</code>, <code class="prettyprint">FileUploadOptions</code> constructors. Although in the global scope, they are not available until after the <code class="prettyprint">deviceready</code> event.</p> +<div class="highlight"><pre><code class="language-text" data-lang="text">document.addEventListener("deviceready", onDeviceReady, false); +function onDeviceReady() { + console.log(FileTransfer); +} +</code></pre></div> +<p>Report issues with this plugin on the <a href="https://issues.apache.org/jira/issues/?jql=project%20%3D%20CB%20AND%20status%20in%20%28Open%2C%20%22In%20Progress%22%2C%20Reopened%29%20AND%20resolution%20%3D%20Unresolved%20AND%20component%20%3D%20%22Plugin%20File%20Transfer%22%20ORDER%20BY%20priority%20DESC%2C%20summary%20ASC%2C%20updatedDate%20DESC">Apache Cordova issue tracker</a></p> + +<h2>Installation</h2> +<div class="highlight"><pre><code class="language-text" data-lang="text">cordova plugin add cordova-plugin-file-transfer +</code></pre></div> +<h2>Supported Platforms</h2> + +<ul> +<li>Amazon Fire OS</li> +<li>Android</li> +<li>BlackBerry 10</li> +<li>Browser</li> +<li>Firefox OS**</li> +<li>iOS</li> +<li>Windows Phone 7 and 8*</li> +<li>Windows</li> +</ul> + +<p>* <em>Do not support <code class="prettyprint">onprogress</code> nor <code class="prettyprint">abort()</code></em></p> + +<p>** <em>Do not support <code class="prettyprint">onprogress</code></em></p> + +<h1>FileTransfer</h1> + +<p>The <code class="prettyprint">FileTransfer</code> object provides a way to upload files using an HTTP +multi-part POST or PUT request, and to download files.</p> + +<h2>Properties</h2> + +<ul> +<li><strong>onprogress</strong>: Called with a <code class="prettyprint">ProgressEvent</code> whenever a new chunk of data is transferred. <em>(Function)</em></li> +</ul> + +<h2>Methods</h2> + +<ul> +<li><p><strong>upload</strong>: Sends a file to a server.</p></li> +<li><p><strong>download</strong>: Downloads a file from server.</p></li> +<li><p><strong>abort</strong>: Aborts an in-progress transfer.</p></li> +</ul> + +<h2>upload</h2> + +<p><strong>Parameters</strong>:</p> + +<ul> +<li><p><strong>fileURL</strong>: Filesystem URL representing the file on the device or a <a href="https://en.wikipedia.org/wiki/Data_URI_scheme">data URI</a>. For backwards compatibility, this can also be the full path of the file on the device. (See <a href="#backwards-compatibility-notes">Backwards Compatibility Notes</a> below)</p></li> +<li><p><strong>server</strong>: URL of the server to receive the file, as encoded by <code class="prettyprint">encodeURI()</code>.</p></li> +<li><p><strong>successCallback</strong>: A callback that is passed a <code class="prettyprint">FileUploadResult</code> object. <em>(Function)</em></p></li> +<li><p><strong>errorCallback</strong>: A callback that executes if an error occurs retrieving the <code class="prettyprint">FileUploadResult</code>. Invoked with a <code class="prettyprint">FileTransferError</code> object. <em>(Function)</em></p></li> +<li><p><strong>options</strong>: Optional parameters <em>(Object)</em>. Valid keys:</p> + +<ul> +<li><strong>fileKey</strong>: The name of the form element. Defaults to <code class="prettyprint">file</code>. (DOMString)</li> +<li><strong>fileName</strong>: The file name to use when saving the file on the server. Defaults to <code class="prettyprint">image.jpg</code>. (DOMString)</li> +<li><strong>httpMethod</strong>: The HTTP method to use - either <code class="prettyprint">PUT</code> or <code class="prettyprint">POST</code>. Defaults to <code class="prettyprint">POST</code>. (DOMString)</li> +<li><strong>mimeType</strong>: The mime type of the data to upload. Defaults to <code class="prettyprint">image/jpeg</code>. (DOMString)</li> +<li><strong>params</strong>: A set of optional key/value pairs to pass in the HTTP request. (Object, key/value - DOMString)</li> +<li><strong>chunkedMode</strong>: Whether to upload the data in chunked streaming mode. Defaults to <code class="prettyprint">true</code>. (Boolean)</li> +<li><strong>headers</strong>: A map of header name/header values. Use an array to specify more than one value. On iOS, FireOS, and Android, if a header named Content-Type is present, multipart form data will NOT be used. (Object)</li> +</ul></li> +<li><p><strong>trustAllHosts</strong>: Optional parameter, defaults to <code class="prettyprint">false</code>. If set to <code class="prettyprint">true</code>, it accepts all security certificates. This is useful since Android rejects self-signed security certificates. Not recommended for production use. Supported on Android and iOS. <em>(boolean)</em></p></li> +</ul> + +<h3>Example</h3> +<div class="highlight"><pre><code class="language-text" data-lang="text">// !! Assumes variable fileURL contains a valid URL to a text file on the device, +// for example, cdvfile://localhost/persistent/path/to/file.txt + +var win = function (r) { + console.log("Code = " + r.responseCode); + console.log("Response = " + r.response); + console.log("Sent = " + r.bytesSent); +} + +var fail = function (error) { + alert("An error has occurred: Code = " + error.code); + console.log("upload error source " + error.source); + console.log("upload error target " + error.target); +} + +var options = new FileUploadOptions(); +options.fileKey = "file"; +options.fileName = fileURL.substr(fileURL.lastIndexOf('/') + 1); +options.mimeType = "text/plain"; + +var params = {}; +params.value1 = "test"; +params.value2 = "param"; + +options.params = params; + +var ft = new FileTransfer(); +ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options); +</code></pre></div> +<h3>Example with Upload Headers and Progress Events (Android and iOS only)</h3> +<div class="highlight"><pre><code class="language-text" data-lang="text">function win(r) { + console.log("Code = " + r.responseCode); + console.log("Response = " + r.response); + console.log("Sent = " + r.bytesSent); +} + +function fail(error) { + alert("An error has occurred: Code = " + error.code); + console.log("upload error source " + error.source); + console.log("upload error target " + error.target); +} + +var uri = encodeURI("http://some.server.com/upload.php"); + +var options = new FileUploadOptions(); +options.fileKey="file"; +options.fileName=fileURL.substr(fileURL.lastIndexOf('/')+1); +options.mimeType="text/plain"; + +var headers={'headerParam':'headerValue'}; + +options.headers = headers; + +var ft = new FileTransfer(); +ft.onprogress = function(progressEvent) { + if (progressEvent.lengthComputable) { + loadingStatus.setPercentage(progressEvent.loaded / progressEvent.total); + } else { + loadingStatus.increment(); + } +}; +ft.upload(fileURL, uri, win, fail, options); +</code></pre></div> +<h2>FileUploadResult</h2> + +<p>A <code class="prettyprint">FileUploadResult</code> object is passed to the success callback of the +<code class="prettyprint">FileTransfer</code> object's <code class="prettyprint">upload()</code> method.</p> + +<h3>Properties</h3> + +<ul> +<li><p><strong>bytesSent</strong>: The number of bytes sent to the server as part of the upload. (long)</p></li> +<li><p><strong>responseCode</strong>: The HTTP response code returned by the server. (long)</p></li> +<li><p><strong>response</strong>: The HTTP response returned by the server. (DOMString)</p></li> +<li><p><strong>headers</strong>: The HTTP response headers by the server. (Object)</p> + +<ul> +<li>Currently supported on iOS only.</li> +</ul></li> +</ul> + +<h3>iOS Quirks</h3> + +<ul> +<li>Does not support <code class="prettyprint">responseCode</code> or <code class="prettyprint">bytesSent</code>.</li> +</ul> + +<h3>Browser Quirks</h3> + +<ul> +<li><strong>withCredentials</strong>: <em>boolean</em> that tells the browser to set the withCredentials flag on the XMLHttpRequest</li> +</ul> + +<h2>download</h2> + +<p><strong>Parameters</strong>:</p> + +<ul> +<li><p><strong>source</strong>: URL of the server to download the file, as encoded by <code class="prettyprint">encodeURI()</code>.</p></li> +<li><p><strong>target</strong>: Filesystem url representing the file on the device. For backwards compatibility, this can also be the full path of the file on the device. (See <a href="#backwards-compatibility-notes">Backwards Compatibility Notes</a> below)</p></li> +<li><p><strong>successCallback</strong>: A callback that is passed a <code class="prettyprint">FileEntry</code> object. <em>(Function)</em></p></li> +<li><p><strong>errorCallback</strong>: A callback that executes if an error occurs when retrieving the <code class="prettyprint">FileEntry</code>. Invoked with a <code class="prettyprint">FileTransferError</code> object. <em>(Function)</em></p></li> +<li><p><strong>trustAllHosts</strong>: Optional parameter, defaults to <code class="prettyprint">false</code>. If set to <code class="prettyprint">true</code>, it accepts all security certificates. This is useful because Android rejects self-signed security certificates. Not recommended for production use. Supported on Android and iOS. <em>(boolean)</em></p></li> +<li><p><strong>options</strong>: Optional parameters, currently only supports headers (such as Authorization (Basic Authentication), etc).</p></li> +</ul> + +<h3>Example</h3> +<div class="highlight"><pre><code class="language-text" data-lang="text">// !! Assumes variable fileURL contains a valid URL to a path on the device, +// for example, cdvfile://localhost/persistent/path/to/downloads/ + +var fileTransfer = new FileTransfer(); +var uri = encodeURI("http://some.server.com/download.php"); + +fileTransfer.download( + uri, + fileURL, + function(entry) { + console.log("download complete: " + entry.toURL()); + }, + function(error) { + console.log("download error source " + error.source); + console.log("download error target " + error.target); + console.log("upload error code" + error.code); + }, + false, + { + headers: { + "Authorization": "Basic dGVzdHVzZXJuYW1lOnRlc3RwYXNzd29yZA==" + } + } +); +</code></pre></div> +<h3>WP8 Quirks</h3> + +<ul> +<li>Download requests is being cached by native implementation. To avoid caching, pass <code class="prettyprint">if-Modified-Since</code> header to download method.</li> +</ul> + +<h3>Browser Quirks</h3> + +<ul> +<li><strong>withCredentials</strong>: <em>boolean</em> that tells the browser to set the withCredentials flag on the XMLHttpRequest</li> +</ul> + +<h2>abort</h2> + +<p>Aborts an in-progress transfer. The onerror callback is passed a FileTransferError object which has an error code of <code class="prettyprint">FileTransferError.ABORT_ERR</code>.</p> + +<h3>Example</h3> +<div class="highlight"><pre><code class="language-text" data-lang="text">// !! Assumes variable fileURL contains a valid URL to a text file on the device, +// for example, cdvfile://localhost/persistent/path/to/file.txt + +var win = function(r) { + console.log("Should not be called."); +} + +var fail = function(error) { + // error.code == FileTransferError.ABORT_ERR + alert("An error has occurred: Code = " + error.code); + console.log("upload error source " + error.source); + console.log("upload error target " + error.target); +} + +var options = new FileUploadOptions(); +options.fileKey="file"; +options.fileName="myphoto.jpg"; +options.mimeType="image/jpeg"; + +var ft = new FileTransfer(); +ft.upload(fileURL, encodeURI("http://some.server.com/upload.php"), win, fail, options); +ft.abort(); +</code></pre></div> +<h2>FileTransferError</h2> + +<p>A <code class="prettyprint">FileTransferError</code> object is passed to an error callback when an error occurs.</p> + +<h3>Properties</h3> + +<ul> +<li><p><strong>code</strong>: One of the predefined error codes listed below. (Number)</p></li> +<li><p><strong>source</strong>: URL to the source. (String)</p></li> +<li><p><strong>target</strong>: URL to the target. (String)</p></li> +<li><p><strong>http_status</strong>: HTTP status code. This attribute is only available when a response code is received from the HTTP connection. (Number)</p></li> +<li><p><strong>body</strong> Response body. This attribute is only available when a response is received from the HTTP connection. (String)</p></li> +<li><p><strong>exception</strong>: Either e.getMessage or e.toString (String)</p></li> +</ul> + +<h3>Constants</h3> + +<ul> +<li>1 = <code class="prettyprint">FileTransferError.FILE_NOT_FOUND_ERR</code></li> +<li>2 = <code class="prettyprint">FileTransferError.INVALID_URL_ERR</code></li> +<li>3 = <code class="prettyprint">FileTransferError.CONNECTION_ERR</code></li> +<li>4 = <code class="prettyprint">FileTransferError.ABORT_ERR</code></li> +<li>5 = <code class="prettyprint">FileTransferError.NOT_MODIFIED_ERR</code></li> +</ul> + +<h2>Windows Quirks</h2> + +<ul> +<li>The plugin implementation is based on <a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.networking.backgroundtransfer.backgrounddownloader.aspx">BackgroundDownloader</a>/<a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.networking.backgroundtransfer.backgrounduploader.aspx">BackgroundUploader</a>, which entails the latency issues on Windows devices (creation/starting of an operation can take up to a few seconds). You can use XHR or <a href="https://msdn.microsoft.com/en-us/library/windows/apps/windows.web.http.httpclient.aspx">HttpClient</a> as a quicker alternative for small downloads.</li> +</ul> + +<h2>Backwards Compatibility Notes</h2> + +<p>Previous versions of this plugin would only accept device-absolute-file-paths as the source for uploads, or as the target for downloads. These paths would typically be of the form:</p> +<div class="highlight"><pre><code class="language-text" data-lang="text">/var/mobile/Applications/<application UUID>/Documents/path/to/file (iOS) +/storage/emulated/0/path/to/file (Android) +</code></pre></div> +<p>For backwards compatibility, these paths are still accepted, and if your application has recorded paths like these in persistent storage, then they can continue to be used.</p> + +<p>These paths were previously exposed in the <code class="prettyprint">fullPath</code> property of <code class="prettyprint">FileEntry</code> and <code class="prettyprint">DirectoryEntry</code> objects returned by the File plugin. New versions of the File plugin however, no longer expose these paths to JavaScript.</p> + +<p>If you are upgrading to a new (1.0.0 or newer) version of File, and you have previously been using <code class="prettyprint">entry.fullPath</code> as arguments to <code class="prettyprint">download()</code> or <code class="prettyprint">upload()</code>, then you will need to change your code to use filesystem URLs instead.</p> + +<p><code class="prettyprint">FileEntry.toURL()</code> and <code class="prettyprint">DirectoryEntry.toURL()</code> return a filesystem URL of the form:</p> +<div class="highlight"><pre><code class="language-text" data-lang="text">cdvfile://localhost/persistent/path/to/file +</code></pre></div> +<p>which can be used in place of the absolute file path in both <code class="prettyprint">download()</code> and <code class="prettyprint">upload()</code> methods.</p> + + + </div> + </div> +</div> + +<script defer type="text/javascript" src="/static/js/lib/toc.min.js"></script> +<script defer type="text/javascript" src="/static/js/docs.js"></script> + + <div class="blue-divider"></div> +<footer> + <div class="container" id="footer"> + <div class="row"> + <div class="col-sm-9"> + <h1>More Resources</h1> + <div class="row"> + <div class="col-sm-4"> + <h2>General</h2> + <ul class="nav"> + <li> + <a target="_blank" href="https://projects.apache.org/project.html?cordova">Apache Project Page</a> + </li> + <li> + <a href="https://dist.apache.org/repos/dist/release/cordova/">Source Distribution</a> + </li> + <li> + <a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0">License</a> + </li> + <li> + <a href="/artwork">Artwork</a> + </li> + </ul> + </div> + <div class="col-sm-4"> + <h2>Development</h2> + <ul class="nav"> + <li><a target="_blank" href="https://github.com/apache?utf8=%E2%9C%93&query=cordova-">Source Code</a></li> + <li><a target="_blank" href="https://issues.apache.org/jira/browse/CB/">Issue Tracker</a></li> + <li><a target="_blank" href="http://stackoverflow.com/questions/tagged/cordova">Stack Overflow</a></li> + <li><a href="/contact">Mailing List</a></li> + </ul> + </div> + <div class="col-sm-4"> + <h2>Apache Software Foundation</h2> + <ul class="nav"> + <li> + <a target="_blank" href="http://www.apache.org/">About ASF</a> + </li> + <li> + <a target="_blank" href="http://www.apache.org/foundation/sponsorship.html">Become a Sponsor</a> + </li> + <li> + <a target="_blank" href="http://www.apache.org/foundation/thanks.html">Thanks</a> + </li> + <li> + <a target="_blank" href="http://www.apache.org/security/">Security</a> + </li> + </ul> + </div> + </div> + </div> + <div class="col-sm-3"> + <h1>Contribute</h1> + <p style="padding-top:20px"><strong>Help Cordova move forward!</strong></p> + <p>Report bugs, improve the docs, or contribute to the code.</p> + <a href="/contribute" class="btn btn-lg btn-primary"> + Learn More + </a> + <p style="padding-top:20px"> <a href="https://twitter.com/apachecordova" class="twitter-follow-button" data-show-count="false">Follow @apachecordova</a></p> + <script async defer src="https://slack.cordova.io/slackin.js"></script> + </div> + </div> + <p class="copyright_text"> + Copyright © 2012, 2013, 2015 The Apache Software Foundation, Licensed under the <a target="_blank" href="http://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a>.<br/> + Apache and the Apache feather logos are <a target="_blank" href="http://www.apache.org/foundation/marks/list/">trademarks</a> of The Apache Software Foundation. + </p> + <a class="closing" href="#top"></a> + </div> +</footer> + +<script defer type="text/javascript" src="/static/js/lib/prettify/prettify.js"></script> +<script defer type="text/javascript" src="/static/js/index.js"></script> +<script defer type="text/javascript" src="/static/js/twitter.js"></script> + + <script> + (function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){ + (i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o), + m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m) + })(window,document,'script','//www.google-analytics.com/analytics.js','ga'); + ga('create', 'UA-64283057-3', 'auto'); + ga('send', 'pageview'); +</script> + +</body> +</html>
--------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
