- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hii....
I want to create sample app where the user can choose a file (used input element of type file), and on click of button , the user should be able to view the the selected file in the preview div element.
I want selected file to be read and display the content of the file in the preview.
Please provide me the solution. Reply soon...
Regards,
Anjali Paria.
- Tags:
- HTML5
- Intel® XDK
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Use Cordova File plugin : https://github.com/apache/cordova-plugin-file. Use the FileReader object to read the file. I'm assuming you are familiar with how to include the plugins in the XDK. If not, please refer to this article : https://software.intel.com/en-us/xdk/docs/add-manage-project-plugins. Also, here is a simple example code of reading a file using Cordova File plugin. http://www.raymondcamden.com/2014/07/15/Cordova-Sample-Reading-a-text-file/

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page