Merge branch 'dev' into master

Futher development should take place on master
This commit is contained in:
Ian Clelland
2014-04-25 11:21:38 -04:00
2 changed files with 2 additions and 9 deletions
+1 -1
View File
@@ -21,7 +21,7 @@
<plugin xmlns="http://apache.org/cordova/ns/plugins/1.0"
xmlns:android="http://schemas.android.com/apk/res/android"
id="org.apache.cordova.file-transfer"
version="0.4.3">
version="0.4.4-dev">
<name>File Transfer</name>
<description>Cordova File Transfer Plugin</description>
<license>Apache 2.0</license>
+1 -8
View File
@@ -28,10 +28,8 @@ import java.io.IOException;
import java.io.InputStream;
import java.io.InputStreamReader;
import java.io.OutputStream;
import java.io.UnsupportedEncodingException;
import java.net.HttpURLConnection;
import java.net.URLConnection;
import java.net.URLDecoder;
import java.security.cert.CertificateException;
import java.security.cert.X509Certificate;
import java.util.HashMap;
@@ -177,12 +175,7 @@ public class FileTransfer extends CordovaPlugin {
String target = args.getString(1);
if (action.equals("upload")) {
try {
source = URLDecoder.decode(source, "UTF-8");
upload(source, target, args, callbackContext);
} catch (UnsupportedEncodingException e) {
callbackContext.sendPluginResult(new PluginResult(PluginResult.Status.MALFORMED_URL_EXCEPTION, "UTF-8 error."));
}
upload(source, target, args, callbackContext);
} else {
download(source, target, args, callbackContext);
}