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'
]
)
2 Replies
i havent found a good way to do this either
i think its a livewire limitation
What about a custom rule, rough example below.