update cordova-plugin-filepath to latest version

This commit is contained in:
Morgan McMillian 2018-09-02 12:03:39 -07:00
parent 1c970a50e3
commit 10bc57a281
5 changed files with 442 additions and 438 deletions

8
package-lock.json generated
View file

@ -2140,7 +2140,7 @@
},
"cordova-android": {
"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=",
"requires": {
"android-versions": "1.3.0",
@ -2389,9 +2389,9 @@
"integrity": "sha1-+lnpe4zdkSYL4L7EYNuOxd6TSI8="
},
"cordova-plugin-filepath": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/cordova-plugin-filepath/-/cordova-plugin-filepath-1.3.0.tgz",
"integrity": "sha512-Dwd76FcVciSssAZ/FPfwfOlfHrmx7CAjYTNzCxeJ4NsMkCfTysCR3vHdX/03XExGi+74DImUB17uXsnyyOYnAQ=="
"version": "1.4.2",
"resolved": "https://registry.npmjs.org/cordova-plugin-filepath/-/cordova-plugin-filepath-1.4.2.tgz",
"integrity": "sha512-6AKL6dIUkY+iOYesP+3/9LC1cxIilDIo0Hdu4tdDNM/ELIxrmxKywTqGy4x76Fv/LIl6l7g8R2tgCbBXTaBvMw=="
},
"cordova-plugin-inappbrowser": {
"version": "3.0.0",

View file

@ -37,7 +37,7 @@
"cordova-plugin-file": "^6.0.1",
"cordova-plugin-file-transfer": "^1.7.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-share-content": "^1.0.0",
"cordova-plugin-splashscreen": "^5.0.2",

View file

@ -434,6 +434,6 @@
"cordova-plugin-device": "2.0.2",
"cordova-plugin-console": "1.1.0",
"cordova-android-support-gradle-release": "1.4.4",
"cordova-plugin-filepath": "1.0.2"
"cordova-plugin-filepath": "1.4.2"
}
}

View file

@ -329,12 +329,16 @@ public class FilePath extends CordovaPlugin {
}
// DownloadsProvider
else if (isDownloadsDocument(uri)) {
final String id = DocumentsContract.getDocumentId(uri);
try {
final Uri contentUri = ContentUris.withAppendedId(
Uri.parse("content://downloads/public_downloads"), Long.valueOf(id));
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
else if (isMediaDocument(uri)) {

View file

@ -280,7 +280,7 @@ module.exports.metadata =
"cordova-plugin-device": "2.0.2",
"cordova-plugin-console": "1.1.0",
"cordova-android-support-gradle-release": "1.4.4",
"cordova-plugin-filepath": "1.0.2"
"cordova-plugin-filepath": "1.4.2"
};
// BOTTOM OF METADATA
});