title: Mime Type PDF php upload
body: <p>I have this snippet</p>
  
  <pre><code>if ($_FILES['tax']['error'] !== UPLOAD_ERR_OK) {
      die("Upload failed with error " . $_FILES['tax']['error']);
  }
      $finfo = finfo_open(FILEINFO_MIME_TYPE);
      $mime = finfo_file($finfo, $_FILES['tax']['tmp_name']);
      $ok = false;
      switch ($mime) {
          case 'image/gif':
          case 'application/pdf':
          case 'image/png':
          $ok = true;
          default:
      die("Unknown/not permitted file type");
      }
      move_uploaded_file($_FILES["tax"]["tmp_name"],"pints/" . $_FILES["tax"]["name"]);
  </code></pre>
  
  <p>When I try to upload the image it states that it isn't a permitted file type, when the file is a PDF document, is <code>application/pdf</code> the correct mime type?</p>