Multi platform File chooser for ionic 3

i want to upload some files to server (pdf,image etc…). from my app. please suggest any multi platform supporting plugin in ionic 3. i think ionic native file chooser only support for android.

Either craft your own picker by traversing the file system using the cordova-plugin-file plugin…


based on the device use either the Android File Chooser…

or the iOS File Picker…

Thanks @Judgewest2000 .if i use file element ,and trigger the click event of this element.will it work on ios .i think it works on android

Actually you might get away with that.

I’ve just knocked together this repo which does allow a selector, and tested it on my Android emulator.

What is your use-case?

Thanks @Judgewest2000 . i want to choose files by input type =‘file’. then the user can upload this files to server .

i want to make sure whether this method will work on IOS .


I think you’ll be fine. You could read the file as a base64 string for example and post said string to the backend. I’ve done that a lot of times with great success.

Also, just tried it on the iPhone and it worked fine.

Thank you @Judgewest2000.

May i know how you get the data from the file? as i can see it return many types of info, but not the data of that file.
edit: actually i want to know how you convert it into base64string