title: Laravel - Video file validation
body: <p>Is this how to validate a video file in laravel ? </p>
  
  <pre><code>$validator = Validator::make(Input::all(),
    array(
      'file'  =&gt; 'mimes:mp4,mov,ogg | max:20000'
    ) 
  );
  </code></pre>
  
  <p>because even if the file uploaded is a mov type, it will return that the file should be one of the types listed in the rule above. </p>
  
  <p><hr/>
  <em>How I ended up solving it:</em> </p>
  
  <p>As prompted from the answer's below I ended up storing the mime type for the uploaded file to a <code>$mime</code> variable like so: </p>
  
  <pre><code>$file = Input::file('file');
  $mime = $file-&gt;getMimeType();
  </code></pre>
  
  <p>Then had to write an if statement to check for video mime types: </p>
  
  <pre><code>if ($mime == "video/x-flv" || $mime == "video/mp4" || $mime == "application/x-mpegURL" || $mime == "video/MP2T" || $mime == "video/3gpp" || $mime == "video/quicktime" || $mime == "video/x-msvideo" || $mime == "video/x-ms-wmv") 
  {
    // process upload
  }
  </code></pre>