title: Laravel 5 Mime validation
body: <p>Ok, I'm trying to upload a video, and validate the file type.</p>
  
  <p>According to the documentation:</p>
  
  <blockquote>
    <p><strong>mimes:foo,bar,...</strong></p>
    
    <p>The file under validation must have a MIME type corresponding to one of the listed extensions.</p>
    
    <p><strong>Basic Usage Of MIME Rule</strong></p>
    
    <p>'photo' => 'mimes:jpeg,bmp,png'</p>
  </blockquote>
  
  <p>I'm uploading a wmv video, and my rules are so:</p>
  
  <pre><code>return [
      'file' =&gt; ['required', 'mimes:video/x-ms-wmv']
  ]
  </code></pre>
  
  <p>I've done a <code>print_r()</code> on <code>Request::file('file')</code> and I get the following data:</p>
  
  <pre><code>Symfony\Component\HttpFoundation\File\UploadedFile Object
  (
      [test:Symfony\Component\HttpFoundation\File\UploadedFile:private] =&gt; 
      [originalName:Symfony\Component\HttpFoundation\File\UploadedFile:private] =&gt; SampleVideo.wmv
      [mimeType:Symfony\Component\HttpFoundation\File\UploadedFile:private] =&gt; video/x-ms-wmv
      [size:Symfony\Component\HttpFoundation\File\UploadedFile:private] =&gt; 70982901
      [error:Symfony\Component\HttpFoundation\File\UploadedFile:private] =&gt; 0
      [pathName:SplFileInfo:private] =&gt; C:\wamp\tmp\php6428.tmp
      [fileName:SplFileInfo:private] =&gt; php6428.tmp
  )
  </code></pre>
  
  <p>However I'm getting the error: </p>
  
  <pre><code>{"file":["The file must be a file of type: video\/x-ms-wmv."]}
  </code></pre>
  
  <p>I've tried changing the "mime type" to <code>video/*</code>, <code>wmv</code> (as per the docs) and also <code>video/x-ms-wmv</code> yet none of them validate the file correctly.</p>
  
  <p>As you can see from the <code>print_r()</code> the mime type Symfony is getting <strong>is</strong> <code>video/x-ms-wmv</code>.</p>
  
  <p>Am I doing something wrong? Or can Laravel/Symfony just not validate files well?</p>
  
  <p>I appreciate the help</p>
  
  <p><strong>Edit</strong>
  Ok, I opened <code>validator.php</code> and added <code>echo $value-&gt;guessExtension();</code> to the <code>ValidateMimes()</code> method, and it outputs asf. </p>
  
  <p>Why is Symfony outputting <code>video\x-ms-wmv</code>, the file extension is wmv, I'm validating both of them, but Laravel is guessing <code>asf</code>?!</p>
  
  <p>It's too unreliable for video validation for me.</p>