don/cordova-filechooser

FileChooser plugin lists file that does not exist

giridharshankar opened this issue · 4 comments

Hello,

I find a strange problem. We have used FileChooser plugin in our hybrid app. When I open the plugin, it lists files (Android) in various folders like Downloads, Recent, Images, etc. However, there are files listed in Downloads but when I pick the file, my app throws an error saying file not found. On further investigation, I found this file is not visible when I use "MyFiles" android app in the same folder. Where and how is this non-existent file being listed in the FileChooser plugin? One additional point I noted is files downloaded from email attachments seem to have this issue with FileChooser plugin. Pls suggest an alternative or request a fix please.

Thanks,
Giri

don commented

I haven't looked at this plugin for a long time. I'd expect those "missing" files use context:// URI or some newer android stuff that was added after this plugin was written. If you use adb shell can you see the files?

Hello
I am trying to use the plugin with my cordova app (cordova 6.3.1 and sdk 23) but it not working for me .. I see the files in the file chooser . However, I don't get the file . After selecting it, the callback is not getting fired.. Is there another setup that I am missing,,,

Thanks

even i am facing same issue, file selector dialog triggers, i select the file but dont get any callbacks.

Tested for:
cordova 6.5.0
android 4.4.2

There is a plugin that can provide valid "file path" from useless "context://" path.

For ionic : https://ionicframework.com/docs/native/file-path/ (Verified)

(Haven't tested myself on cordova though)
For cordova : https://github.com/hiddentao/cordova-plugin-filepath