update cordova-plugin-filepath to latest version
This commit is contained in:
parent
1c970a50e3
commit
10bc57a281
5 changed files with 442 additions and 438 deletions
8
package-lock.json
generated
8
package-lock.json
generated
|
@ -2140,7 +2140,7 @@
|
||||||
},
|
},
|
||||||
"cordova-android": {
|
"cordova-android": {
|
||||||
"version": "7.1.0",
|
"version": "7.1.0",
|
||||||
"resolved": "https://registry.npmjs.org/cordova-android/-/cordova-android-7.1.0.tgz",
|
"resolved": "http://registry.npmjs.org/cordova-android/-/cordova-android-7.1.0.tgz",
|
||||||
"integrity": "sha1-HNNu57nRm61Q0+mEK3Mf5ZCSTdU=",
|
"integrity": "sha1-HNNu57nRm61Q0+mEK3Mf5ZCSTdU=",
|
||||||
"requires": {
|
"requires": {
|
||||||
"android-versions": "1.3.0",
|
"android-versions": "1.3.0",
|
||||||
|
@ -2389,9 +2389,9 @@
|
||||||
"integrity": "sha1-+lnpe4zdkSYL4L7EYNuOxd6TSI8="
|
"integrity": "sha1-+lnpe4zdkSYL4L7EYNuOxd6TSI8="
|
||||||
},
|
},
|
||||||
"cordova-plugin-filepath": {
|
"cordova-plugin-filepath": {
|
||||||
"version": "1.3.0",
|
"version": "1.4.2",
|
||||||
"resolved": "https://registry.npmjs.org/cordova-plugin-filepath/-/cordova-plugin-filepath-1.3.0.tgz",
|
"resolved": "https://registry.npmjs.org/cordova-plugin-filepath/-/cordova-plugin-filepath-1.4.2.tgz",
|
||||||
"integrity": "sha512-Dwd76FcVciSssAZ/FPfwfOlfHrmx7CAjYTNzCxeJ4NsMkCfTysCR3vHdX/03XExGi+74DImUB17uXsnyyOYnAQ=="
|
"integrity": "sha512-6AKL6dIUkY+iOYesP+3/9LC1cxIilDIo0Hdu4tdDNM/ELIxrmxKywTqGy4x76Fv/LIl6l7g8R2tgCbBXTaBvMw=="
|
||||||
},
|
},
|
||||||
"cordova-plugin-inappbrowser": {
|
"cordova-plugin-inappbrowser": {
|
||||||
"version": "3.0.0",
|
"version": "3.0.0",
|
||||||
|
|
|
@ -37,7 +37,7 @@
|
||||||
"cordova-plugin-file": "^6.0.1",
|
"cordova-plugin-file": "^6.0.1",
|
||||||
"cordova-plugin-file-transfer": "^1.7.1",
|
"cordova-plugin-file-transfer": "^1.7.1",
|
||||||
"cordova-plugin-filechooser": "^1.0.1",
|
"cordova-plugin-filechooser": "^1.0.1",
|
||||||
"cordova-plugin-filepath": "^1.3.0",
|
"cordova-plugin-filepath": "^1.4.2",
|
||||||
"cordova-plugin-inappbrowser": "^3.0.0",
|
"cordova-plugin-inappbrowser": "^3.0.0",
|
||||||
"cordova-plugin-share-content": "^1.0.0",
|
"cordova-plugin-share-content": "^1.0.0",
|
||||||
"cordova-plugin-splashscreen": "^5.0.2",
|
"cordova-plugin-splashscreen": "^5.0.2",
|
||||||
|
|
|
@ -434,6 +434,6 @@
|
||||||
"cordova-plugin-device": "2.0.2",
|
"cordova-plugin-device": "2.0.2",
|
||||||
"cordova-plugin-console": "1.1.0",
|
"cordova-plugin-console": "1.1.0",
|
||||||
"cordova-android-support-gradle-release": "1.4.4",
|
"cordova-android-support-gradle-release": "1.4.4",
|
||||||
"cordova-plugin-filepath": "1.0.2"
|
"cordova-plugin-filepath": "1.4.2"
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -329,12 +329,16 @@ public class FilePath extends CordovaPlugin {
|
||||||
}
|
}
|
||||||
// DownloadsProvider
|
// DownloadsProvider
|
||||||
else if (isDownloadsDocument(uri)) {
|
else if (isDownloadsDocument(uri)) {
|
||||||
|
|
||||||
final String id = DocumentsContract.getDocumentId(uri);
|
final String id = DocumentsContract.getDocumentId(uri);
|
||||||
|
try {
|
||||||
final Uri contentUri = ContentUris.withAppendedId(
|
final Uri contentUri = ContentUris.withAppendedId(
|
||||||
Uri.parse("content://downloads/public_downloads"), Long.valueOf(id));
|
Uri.parse("content://downloads/public_downloads"), Long.valueOf(id));
|
||||||
|
|
||||||
return getDataColumn(context, contentUri, null, null);
|
return getDataColumn(context, contentUri, null, null);
|
||||||
|
} catch(NumberFormatException e) {
|
||||||
|
//In Android 8 and Android P the id is not a number
|
||||||
|
return uri.getPath().replaceFirst("^/document/raw:", "").replaceFirst("^raw:", "");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
// MediaProvider
|
// MediaProvider
|
||||||
else if (isMediaDocument(uri)) {
|
else if (isMediaDocument(uri)) {
|
||||||
|
|
|
@ -280,7 +280,7 @@ module.exports.metadata =
|
||||||
"cordova-plugin-device": "2.0.2",
|
"cordova-plugin-device": "2.0.2",
|
||||||
"cordova-plugin-console": "1.1.0",
|
"cordova-plugin-console": "1.1.0",
|
||||||
"cordova-android-support-gradle-release": "1.4.4",
|
"cordova-android-support-gradle-release": "1.4.4",
|
||||||
"cordova-plugin-filepath": "1.0.2"
|
"cordova-plugin-filepath": "1.4.2"
|
||||||
};
|
};
|
||||||
// BOTTOM OF METADATA
|
// BOTTOM OF METADATA
|
||||||
});
|
});
|
Reference in a new issue