don/cordova-filechooser

Neither success not error callback invoked when the user clicks back

ryaa opened this issue · 4 comments

ryaa commented

When fileChooser.open invoked with both success and error callbacks and the user clicks back the file choose is closed but none of the callbacks are invoked

+1. Same issue here. None of the callbacks are invoked.

I found a solution:
replace:

// TODO NO_RESULT or error callback?
                PluginResult pluginResult = new PluginResult(PluginResult.Status.NO_RESULT);
callback.sendPluginResult(pluginResult);

by:
callback.error("File uri was null");

+1