Multi platform File chooser for ionic 3


#1

Hi
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.


#2

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

or

based on the device use either the Android File Chooser…


or the iOS File Picker…


#3

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


#4

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?


#5

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 .


#6

Hi,

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.


#7

Thank you @Judgewest2000.