resolveLocalFileSystemURI is deprecated. Please call resolveLocalFileSystemURL instead.
Closed this issue · 6 comments
Hi there.
Nice work on this plugin. I was trying to use it on a new project but got this error back:
resolveLocalFileSystemURI is deprecated. Please call resolveLocalFileSystemURL instead.
This is my complete code:
let storage_location = ''
if (this.$q.platform.is.ios) {
storage_location = cordova.file.documentsDirectory
}
else if (this.$q.platform.is.android) {
storage_location = 'file:///storage/emulated/0/'
}
downloader.init({folder: 'download', fileSystem: storage_location})
downloader.get(this.library.file_url_complete)
Any clues on what can be causing this? Thanks.
Same problem here, any idea why this is happening?
so where is solution?
I am also getting this error on Android. I do not get it on iOS.
Why this is closed? any solution to this?
@alexpvieira - alex must have figured this out because he closed his own issue. Several others might still be looking for the fix though:
The original plugin by @fastrde was written several years ago when the fileSystem was referenced as resolveLocalFileSystemURI
. when @mramonlopez forked and updated it he didn't make changes that accounted for the file system changes. Somewhere in 2018 cordova-plugin-file
changed the file system reference to resolveLocalFileSystemURL
As far as I can tell this only impacts the plugin when using the fileSystem
option (ie: downloader.init({folder: 'download', fileSystem: storage_location}), to fix this, you will need to mod the src code, in the plugin's src/downloader.js
file, line 451 needs to be updated from:
resolveLocalFileSystemURI
to resolveLocalFileSystemURL
This is a related fileSystem path issue, has anyone on this thread dealt with it....or know whats going on? Trying to look at the source code to find what could be causing it but so far no luck.