Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
file.getMetadata(function (meta) {
mediaFiles.push(new MediaFile(file.name, file.toURL(), 'image/jpeg', meta.modificationTime, meta.size));
// Check if we're done with capture. If so, then call a successCallback
if (imagesTaken >= limit) {
successCallback(mediaFiles);
}
}, fail);
};
photoFile.getBasicPropertiesAsync().done(function (basicProperties) {
var result = new MediaFile(photoFile.name, 'ms-appdata:///local/' + photoFile.name, photoFile.contentType, basicProperties.dateModified, basicProperties.size);
result.fullPath = photoFile.path;
successCallback([result]);
}, function (err) {
fail(CaptureError.CAPTURE_INTERNAL_ERR, err);