wymsee / cordova-imagePicker

Cordova Plugin For Multiple Image Selection
MIT License
407 stars 853 forks source link

I want to get the captured date of the uploaded image and not the uploaded date in iOS #287

Open aliabbasbhojani1 opened 9 months ago

aliabbasbhojani1 commented 9 months ago

I am working in iOS and after selecting the images, I get the temp path of all the selected images in success callback method. Then I call window.resolveLocalFileSystemURL() on the selected paths to get the FileEntry object and then, I call the file() of FileEntry to get the File object. The File object has a property lastModifiedDate which returns the current date. I need the captured date of the image. For example, if the image was captured two years back, I want that date not the current date.

function onSuccess(filePathArray)
{
    window.resolveLocalFileSystemURL(filePathArray[0], function(fileEntry){
        fileEntry.file(function(file){
            console.log(file.lastModifiedDate);
        });
    });
}