I want to get the file name and the native Path of the selected image from gallery. The below code works perfectly for Android But, gives null in IOS.
Titanium.Media.openPhotoGallery({
success : function(event) {
selectedImage = event.media;
//Ti.API.info("image : " + JSON.stringify(selectedImage)); --> Returns {}
if (event.mediaType == Ti.Media.MEDIA_TYPE_PHOTO) {
//Ti.API.info("selectedImage : " + JSON.stringify(selectedImage)); --> Returns {}
//Ti.API.info("selectedImage : " + JSON.stringify(selectedImage.nativePath)); --> Returns null
//Ti.API.info("selectedImage.file.name : " + JSON.stringify(selectedImage.file.name)); --> Throws error
}
}
});
Is there any other way to get the fileName, ImageType and nativePath?
Thanks in Advance.