D7 how to check does the uploaded photo have EXIF data? I'm using Drupal 7 with module EXIF.
I want to check if uploaded photo have EXIF data if not then don't allow the user to add this content.
If you want to check a file that is being added through a file field on a content type you can use hook_node_presave. Unless you need the exif module for other reasons you can do without this module and just use the exif_read_data function. Make sure to enable to the exif extension in php.

function mymodule_node_presave($node) {
  if ($node-&gt;type == 'article') {
    // Still needs some checking here to see if a file is provided
    $fid = $node-&gt;field_file['und'][0]['fid'];
    $file = file_load($fid);
    $hasExif = exif_read_data($file-&gt;uri, 0, true);
  }
}