mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-07 16:30:40 +00:00
4.6.7 fix (#752)
This commit is contained in:
@@ -27,7 +27,7 @@ const Upload = dynamic(() => import('../commonProgress/Upload'));
|
||||
const PreviewRawText = dynamic(() => import('../components/PreviewRawText'));
|
||||
|
||||
type FileItemType = ImportSourceItemType & { file: File };
|
||||
const fileType = '.txt, .docx, .pdf, .md, .html';
|
||||
const fileType = '.txt, .docx, .csv, .pdf, .md, .html';
|
||||
const maxSelectFileCount = 1000;
|
||||
|
||||
const FileLocal = ({ activeStep, goToNext }: ImportDataComponentProps) => {
|
||||
|
@@ -14,7 +14,8 @@ import { useImportStore } from '../Provider';
|
||||
import { feConfigs } from '@/web/common/system/staticData';
|
||||
|
||||
import dynamic from 'next/dynamic';
|
||||
import { fileDownload, readCsvContent } from '@/web/common/file/utils';
|
||||
import { fileDownload } from '@/web/common/file/utils';
|
||||
import { readCsvContent } from '@fastgpt/web/common/file/read/csv';
|
||||
|
||||
const PreviewData = dynamic(() => import('../commonProgress/PreviewData'));
|
||||
const Upload = dynamic(() => import('../commonProgress/Upload'));
|
||||
@@ -56,7 +57,7 @@ const SelectFile = React.memo(function SelectFile({ goToNext }: { goToNext: () =
|
||||
{
|
||||
for await (const selectFile of files) {
|
||||
const { file, folderPath } = selectFile;
|
||||
const { header, data } = await readCsvContent(file);
|
||||
const { header, data } = await readCsvContent({ file });
|
||||
|
||||
const filterData: FileItemType['chunks'] = data
|
||||
.filter((item) => item[0])
|
||||
|
Reference in New Issue
Block a user