I'm trying to let user pick a file (from storage) inside my NativeScript app to later upload that file to a server, but I couldn't find any file-picker really working.
I've found out that someway it should be possible to use nativescript-imagepicker for selecting any file type and get file path from there for upload. This would be great cause I could then use Nativescript-Filesystem for my purpose. I create context this way:
let context = imagepicker.create({
maximumNumberOfSelection: 1,
minimumNumberOfSelection: 1,
mediaType: imagepicker.ImagePickerMediaType.Any,
mode: 'single'
});
However I cannot select any file other than images on android (API 28) and from documentation "mediaType" is only for iOS. Has anyone been able to make it work this way as reported in first link? Am I missing something?
Is there any other way I could try to accomplish my desired result? I've had a try also on Mediafilepicker but cannot use it because it gives me a lot of conflicts with existing plugins I need for my project. Just need something simple for selecting a file, what's the best "NativeScript way" of doing this? (preferably working both on android and iOS)
Please let me know if you need other info and be patient, I'm kinda noob on NativeScript. Thank you in advance.