You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cordova.apache.org by mm...@apache.org on 2013/05/02 21:20:27 UTC

docs commit: Fixed code example poor formatting in FileTransfer docs

Updated Branches:
  refs/heads/master e02de0f91 -> ddad6cfd9


Fixed code example poor formatting in FileTransfer docs


Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/ddad6cfd
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/ddad6cfd
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/ddad6cfd

Branch: refs/heads/master
Commit: ddad6cfd90168f3f654487ab21da36096f7c0a57
Parents: e02de0f
Author: Michal Mocny <mm...@gmail.com>
Authored: Thu May 2 15:18:53 2013 -0400
Committer: Michal Mocny <mm...@gmail.com>
Committed: Thu May 2 15:19:42 2013 -0400

----------------------------------------------------------------------
 .../edge/cordova/file/filetransfer/filetransfer.md |   47 +++++++--------
 1 files changed, 23 insertions(+), 24 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/ddad6cfd/docs/en/edge/cordova/file/filetransfer/filetransfer.md
----------------------------------------------------------------------
diff --git a/docs/en/edge/cordova/file/filetransfer/filetransfer.md b/docs/en/edge/cordova/file/filetransfer/filetransfer.md
index 222072d..fdcd9d6 100644
--- a/docs/en/edge/cordova/file/filetransfer/filetransfer.md
+++ b/docs/en/edge/cordova/file/filetransfer/filetransfer.md
@@ -62,35 +62,34 @@ __Parameters:__
 - __trustAllHosts__ - Optional parameter, defaults to false. If set to true then it will accept all security certificates. This is useful as Android rejects self signed security certificates. Not recommended for production use. Supported on Android and iOS. _(boolean)_
 
 __Quick Example__
-	
+
     // !! Assumes variable fileURI contains a valid URI to a text file on the device
-	
-  	var win = function(r) {
-        console.log("Code = " + r.responseCode);
-        console.log("Response = " + r.response);
-        console.log("Sent = " + r.bytesSent);
-	}
-	
+    
+    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);
+      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=fileURI.substr(fileURI.lastIndexOf('/')+1);
-	options.mimeType="text/plain";
+    
+    var options = new FileUploadOptions();
+    options.fileKey="file";
+    options.fileName=fileURI.substr(fileURI.lastIndexOf('/')+1);
+    options.mimeType="text/plain";
 
-  var params = {};
-	params.value1 = "test";
-	params.value2 = "param";
-		
-	options.params = params;
-	
-	var ft = new FileTransfer();
-    ft.upload(fileURI, encodeURI("http://some.server.com/upload.php"), win, fail, options);
+    var params = {};
+    params.value1 = "test";
+    params.value2 = "param";
     
+    options.params = params;
+    
+    var ft = new FileTransfer();
+    ft.upload(fileURI, encodeURI("http://some.server.com/upload.php"), win, fail, options);
+
 __Full Example__
 
     <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN" "http://www.w3.org/TR/html4/strict.dtd">