How to access iphone gallery/Photos directory using phonegap file api?
By using following code, I can access android phone's photos.
window.requestFileSystem(LocalFileSystem.PERSISTENT, 0, function(fileSystem){
var sdcard = fileSystem.root;
sdcard.getDirectory('dcim',{create:false}, function(dcim){
var gallery = $('#gallery');
listDir(dcim, gallery);
}, function(error){
alert(error.code);
})
}, function(evt){ // error get file system
console.log(evt.target.error.code);
});
}
But when I tried this in iOS, It returns the applications' Document
folder. I want to access DCIM or Photos directories of iPhone/iPad. how I
can do that?
No comments:
Post a Comment