I’m trying to upload a file from a phonegap app on my blackberry device to my lamp server. I followed the tutorials below and they do what the author expects them to do:
http://docs.phonegap.com/en/1.0.0/phonegap_file_file.md.html#FileTransfer
http://zacvineyard.com/blog/2011/03/25/upload-a-file-to-a-remote-server-with-phonegap/
However, the tutorials do not achieve my objective. The problem is that the only file I’m allowed to upload is a picture that I immediately take with the camera. I am not able to browse my Blackberry device for other pictures, audio files, text files and “choose” them.
How do I modify the code in the above examples to allow me to choose a file for upload? Am I overlooking something?
If that code snippet is all you have used, then you have indeed, overlooked some key areas. You should probably start with this
and work towards your goal. I would start by writing a simple file manager type app.
Enumerate the entire sdcard or storage tree.
When you find the directory you’d like to enter, enter and enumerate it’s contents
Define a method to select files and upload them.