Importing TSV tab delimited content using Filament Import Action
Hello,
I'm trying to allow the importing of tab-delimited content in a TSV file using the ImportAction in a getHeaderActions function.
Here's my code:
I'm running into two issues.
First, it's rejecting files with a tsv extension. It returns the error "Expects text/csv, text/x-csv, application/csv, application/x-csv, text/comma-separated-values, text/x-comma-separated-values, text/plain or application/vnd.ms-excel".
Second, if I upload a txt file, it's ignoring the \t csvDelimiter option, it sees the header row as 1 long entry.
I feel like I may be missing something obvious, but I've searched (Stackoverflow/Github) for importing TSV files and haven't been able to find anything.
Any help is appreciated.


2 Replies
Can you provide a sample of your tsv?
Here's a sample of the tsv data: