PDA

View Full Version : How to show a file open dialog and read the selected file?



linuxyf
22 Dec 2011, 1:05 AM
How to show a file open dialog and read the selected file?

mitchellsimoens
22 Dec 2011, 7:16 AM
Mobile browsers do not allow file uploading or anything like that.

stan229
22 Dec 2011, 1:01 PM
Android 2.2+ supports File Upload

Just change the inputType property to "file" and it will show the file upload dialog.
It's currently deprecated so I guess it's better to roll your own InputFileField class.

linuxyf
22 Dec 2011, 5:25 PM
i only run the program on PC.

aoathout
22 Dec 2011, 5:33 PM
If you only run the app on pc then why use Touch? You would be better off using extjs 4 for pc only apps. If you need file upload for mobile look at phonegap

linuxyf
23 Dec 2011, 12:42 AM
thanks everyone.

I only want to select a text file and read it's content to textareafield. don't upload the file.

i have resolve this problem by input element and filereader object.

fairport
13 Jan 2013, 7:05 PM
Hi linuxyf...
I am in the finishing stages of adapting one of our sencha-phonegap apps for use on vehicle mounted Windows 7 touch screen rugged tablets... and need exactly the same thing .. i.e. a way to import and read data from a USB flash drive when WiFi or 3g comms are not an option.
Can you expand a bit on how you solved this problem. (if you don't mind)
Thanks