FilamentF
Filament3y ago
3 replies
Lea

acceptedFileTypes(['text/csv']) doesn't validate CSV with semicolons

I'm trying to use FileUpload, but the csv file only works if the delimeter is , (commas)
When I upload one with ; (semicolons) it doesn't validate

I kind of fix it adding text/plain, but I need to validate at least that the extensions ends with .csv, xls or xlsx

Anyone knows how?

->acceptedFileTypes( [ 'csv', 'text/csv', 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet', 'application/vnd.ms-excel', 'application/vnd.oasis.opendocument.spreadsheet', 'text/plain' ] )
Was this page helpful?