fix: Resolve issue with csv suffix classification
Signed-off-by: EricXiao <taoiaox@gmail.com>
This commit is contained in:
parent
4c609d6074
commit
661c194f97
1 changed files with 4 additions and 0 deletions
|
|
@ -55,6 +55,10 @@ def guess_file_type(file: BinaryIO, name: Optional[str] = None) -> filetype.Type
|
|||
file_type = Type("text/plain", "txt")
|
||||
return file_type
|
||||
|
||||
if ext in [".csv"]:
|
||||
file_type = Type("text/csv", "csv")
|
||||
return file_type
|
||||
|
||||
file_type = filetype.guess(file)
|
||||
|
||||
# If file type could not be determined consider it a plain text file as they don't have magic number encoding
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue