mirror of
https://github.com/apache/cordova-android.git
synced 2025-02-20 23:56:20 +08:00
Fixing issue with FileTransfer.upload when the passed in url contains a ?
This commit is contained in:
parent
5fac30ea34
commit
c66142d6b8
@ -429,7 +429,12 @@ public class FileTransfer extends Plugin {
|
||||
return ctx.getContentResolver().openInputStream(uri);
|
||||
}
|
||||
else if (path.startsWith("file://")) {
|
||||
return new FileInputStream(path.substring(7));
|
||||
int question = path.indexOf("?");
|
||||
if (question == -1) {
|
||||
return new FileInputStream(path.substring(7));
|
||||
} else {
|
||||
return new FileInputStream(path.substring(7, question));
|
||||
}
|
||||
}
|
||||
else {
|
||||
return new FileInputStream(path);
|
||||
|
Loading…
Reference in New Issue
Block a user