Laravel MIME issue while validating .csv file

前端 未结 3 1726
感动是毒
感动是毒 2021-01-11 22:45

I have read couple of post regarding the issue of checking the file extension while upload a file using laravel.

I have the same issue and didn\'t file the solution

3条回答
  •  渐次进展
    2021-01-11 23:16

    Here are several types I used for more complete csv validation, hope it will help future usage

            return [
                'sheet' => 'required|mimetypes:text/csv,text/plain,application/csv,text/comma-separated-values,text/anytext,application/octet-stream,application/txt'
            ];
    

提交回复
热议问题