mirror of
https://github.com/labring/FastGPT.git
synced 2025-10-17 00:14:51 +00:00
fix: csv select
This commit is contained in:
@@ -48,7 +48,9 @@ const CsvImport = ({ kbId }: { kbId: string }) => {
|
||||
setSelecting(true);
|
||||
try {
|
||||
let promise = Promise.resolve();
|
||||
files.forEach((file) => {
|
||||
files
|
||||
.filter((file) => /csv$/.test(file.name))
|
||||
.forEach((file) => {
|
||||
promise = promise.then(async () => {
|
||||
const { header, data } = await readCsvContent(file);
|
||||
if (header[0] !== 'question' || header[1] !== 'answer') {
|
||||
|
Reference in New Issue
Block a user