fix: upload file (#2992)

* fix: upload file

* chore: remove wasm, support html image parse

* chore: adjust

* chore: move base64match function into htmlstr2md
This commit is contained in:
Finley Ge
2024-10-28 21:44:50 +08:00
committed by GitHub
parent 4e3d817b63
commit b712a821f8
8 changed files with 440 additions and 240 deletions

View File

@@ -32,6 +32,7 @@ async function handler(req: ApiRequestProps<FileIdCreateDatasetCollectionParams>
...body
} = req.body;
const start = Date.now();
const { teamId, tmbId, dataset } = await authDataset({
req,
authToken: true,
@@ -46,6 +47,7 @@ async function handler(req: ApiRequestProps<FileIdCreateDatasetCollectionParams>
bucketName: BucketNameEnum.dataset,
fileId
});
// 2. split chunks
const chunks = rawText2Chunks({
rawText,