I am working on preexisting code which allows users to import csv files. I am trying to understand how the code works with some csv files but it fails at this condition:
if ($data['file']->getClientMimeType() == 'application/vnd.ms-excel') {
How can I set the mimetype of my csv file? How do I access the header of my csv file to set it?