Dan's avatar
Level 11

Validating mime type

Hey guys,

Trying to validate a file upload with the following:

'csv'  => 'required|mimes:text/csv'

But Laravel isn't playing nice. Even if I dump out the mime type of the file it tells me it's a text/csv file.

dd($request->file('csv')->getClientMimeType()); // text/csv

Am I missing something?

Cheers in advance!

0 likes
0 replies

Please or to participate in this conversation.