mirror of
https://github.com/apache/cordova-android.git
synced 2025-01-20 07:52:53 +08:00
CB-1151: FileTransfer.download decodes the URL, resulting in a 404 error
This commit is contained in:
parent
a219feaa60
commit
2dc0727e36
@ -75,7 +75,7 @@ public class FileTransfer extends Plugin {
|
|||||||
String source = null;
|
String source = null;
|
||||||
String target = null;
|
String target = null;
|
||||||
try {
|
try {
|
||||||
source = URLDecoder.decode(args.getString(0));
|
source = args.getString(0);
|
||||||
target = args.getString(1);
|
target = args.getString(1);
|
||||||
} catch (JSONException e) {
|
} catch (JSONException e) {
|
||||||
Log.d(LOG_TAG, "Missing source or target");
|
Log.d(LOG_TAG, "Missing source or target");
|
||||||
@ -83,7 +83,7 @@ public class FileTransfer extends Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (action.equals("upload")) {
|
if (action.equals("upload")) {
|
||||||
return upload(source, target, args);
|
return upload(URLDecoder.decode(source), target, args);
|
||||||
} else if (action.equals("download")) {
|
} else if (action.equals("download")) {
|
||||||
return download(source, target);
|
return download(source, target);
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user