(ext: string)
| 1063 | * @returns {string} |
| 1064 | */ |
| 1065 | export const mapExtToInputField = (ext: string) => { |
| 1066 | switch (ext) { |
| 1067 | case '.txt': |
| 1068 | return 'txtFile' |
| 1069 | case '.pdf': |
| 1070 | return 'pdfFile' |
| 1071 | case '.json': |
| 1072 | return 'jsonFile' |
| 1073 | case '.csv': |
| 1074 | case '.xls': |
| 1075 | case '.xlsx': |
| 1076 | return 'csvFile' |
| 1077 | case '.jsonl': |
| 1078 | return 'jsonlinesFile' |
| 1079 | case '.docx': |
| 1080 | case '.doc': |
| 1081 | return 'docxFile' |
| 1082 | case '.yaml': |
| 1083 | return 'yamlFile' |
| 1084 | default: |
| 1085 | return 'txtFile' |
| 1086 | } |
| 1087 | } |
| 1088 | |
| 1089 | /** |
| 1090 | * Map MimeType to InputField |
no outgoing calls
no test coverage detected