mirror of
https://github.com/apache/cordova-plugin-file-transfer.git
synced 2026-05-17 00:00:03 +08:00
Merge branch 'dev' into master
Futher development should take place on master
This commit is contained in:
+1
-1
@@ -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>
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user