Shoaib Chikate
Shoaib Chikate

Reputation: 8975

How to browse and select a file from sdcard using Phonegap 3.0?

Gone through API of Phonegap 3.0.

I want to browse files from SD card when i click on link or button by using UI

For example:

 <p onclick="browseFile()">Upload</p>

let assume browseFile() function contains the browsing but require UI implementation.

Or

 <input type="file">

But when i use input type=file,it is browsing file from Gallery and Music Tracks but not from SD card.

I want that i should be able to select file from SD by using UI when i click on link or button

Can anyone suggest the link for same which give Java Script code along with UI for browsing file from SD card?

Upvotes: 4

Views: 5332

Answers (2)

jahu
jahu

Reputation: 5657

I haven't found a ready solution out there in the wild and I needed one for my project, so I wrote this simple library called FileSelect. It's licensed with WTFPL, so you can use for whatever purpose you want.

Upvotes: 1

trejder
trejder

Reputation: 17495

There is no out-of-the-box solution. Unfortunately, you have to build it yourself, using File API.

Here you have an example, build using jQuery Mobile.

Upvotes: 5

Related Questions