| Last Updated: 06-Jan-17
Here I will show you how one can browse file from filesystem.
Platform Supported - Android
File Chooser helps user to browse file from file system and attach it as attachment and send it to server.
Plugin to use:
I used plugin named FileChooser you can use the following link to check the plugin at Github
To add this plugin in your project follow the following procedure:
Using terminal go in your project directory, from inside your cordova project you have to enter the following command:
After installing plugin make a control in HTML on click of which you need to browse file from file system. While we click on button it will open an pop up that will help you in browsing your file. The pop up comprises of different sections like:
- Any Third Party Browsing application
Pop up window to browse file will be open by following code:
When you select any file it will return its URI to you that we will give as reference to attachment on submitting form, we will send file across server.