title: Paperclip: Cannot attach XLS (But DOC works)
body: <p>I cannot attach a XLS file, but DOC works:</p>
  
  <blockquote>
    <p>Attachments file content type is invalid<br>
    Attachments file is invalid</p>
  </blockquote>
  
  <p>Here is the log:</p>
  
  <pre><code>Parameters: ... "files"=&gt;[#&lt;ActionDispatch::Http::UploadedFile:0x0000000daf7730 @tempfile=#&lt;Tempfile:C:/Users/Chloe/AppData/Local/Temp/RackMultipart20170511-47156-ym774u.xls&gt;, @original_filename="Chocolate_Store1.xls", @content_type="application/vnd.ms-excel", @headers="Content-Disposition: form-data; name=\"deal[files][]\"; filename=\"Chocolate_Store1.xls\"\r\nContent-Type: application/vnd.ms-excel\r\n"&gt;],
  ...
  Command :: file -b --mime "C:/Users/Chloe/AppData/Local/Temp/1f1fb4d71efc0bd245abd7b5b9aa661220170511-47156-1rqzd0q.xls"
     (1.0ms)  ROLLBACK
    Rendering deals/edit.html.erb within layouts/application
  </code></pre>
  
  <p>When I test the type:</p>
  
  <pre><code>&gt;file -b --mime "C:/Users/Chloe/AppData/Local/Temp/1f1fb4d71efc0bd245abd7b5b9aa661220170511-47156-1rqzd0q.xls"
  application/vnd.ms-office; charset=binary
  </code></pre>
  
  <p>I have this type in my accept list:</p>
  
  <pre><code>class Attachment &lt; ApplicationRecord
    has_attached_file :file
    validates_attachment_content_type :file, content_type: [
      "application/pdf", "application/msword", 
      "application/vnd.openxmlformats-officedocument.wordprocessingml.document", 
      "application/vnd.oasis.opendocument.text",
      "application/vnd.ms-excel",
      "application/vnd.ms-office",
      "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet",
      "application/vnd.oasis.opendocument.spreadsheet"
     ]
  
  end
  </code></pre>
  
  <p>Rails 5.0.2, Paperclip 5.1.0, File 5.04 (DevKit)</p>
  
  <hr>
  
  <p>I noticed DevKit <code>file</code> differs from Cygwin <code>file</code>. Not sure if relevant:</p>
  
  <pre><code>&gt;file -b --mime "C:/Users/Chloe/AppData/Local/Temp/1f1fb4d71efc0bd245abd7b5b9aa661220170515-54920-1e2bk5s.xls"
  application/vnd.ms-office; charset=binary
  
  $ file -b --mime "C:/Users/Chloe/AppData/Local/Temp/1f1fb4d71efc0bd245abd7b5b9aa661220170515-54920-1e2bk5s.xls"
  application/vnd.ms-excel; charset=binary
  </code></pre>