title: Why cannot read csv file by PhpOffice\PhpSpreadsheet?
body: <p>I'm using PhpOffice\PhpSpreadsheet to read a csv file like :</p>
  <pre><code>$reader = \PhpOffice\PhpSpreadsheet\IOFactory::createReaderForFile($file);
  $reader-&gt;setReadDataOnly(true);
  $spreadsheet = $reader-&gt;load($file);
  </code></pre>
  <p>It error: <code>Warning: mime_content_type(): Can only process string or stream arguments</code>.</p>
  <p>But it works well with xlsx file.</p>
  <p>I tried use PhpOffice\PhpSpreadsheet\Reader\Csv but it's same error.
  I tried dump $file, I see mimeType is <code>text/csv</code>, but when $file-&gt;getMimeType() is return <code>text/plain</code>. This makes me cannot validate the upload file (I just allow user upload xlsx/csv file). I think it maybe cause error cannot read csv file?</p>
  <p><strong>Edit:</strong> It is my fault. <code>load()</code> receive arguments as a string but I pass a Symfony\Component\HttpFoundation\File\UploadFile (because it's work with xlsx file). So change <code>$file</code> to <code>$file-&gt;getPathName()</code> and it works well.
  But with validate file, I think I have to accept text/plain, does anyone has any idea?</p>