mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 05:12:39 +00:00

* fix: upload file * chore: remove wasm, support html image parse * chore: adjust * chore: move base64match function into htmlstr2md
15 lines
409 B
TypeScript
15 lines
409 B
TypeScript
import { ReadRawTextByBuffer, ReadFileResponse } from '../type';
|
|
import { readFileRawText } from './rawText';
|
|
import { html2md } from '../../htmlStr2Md/utils';
|
|
|
|
export const readHtmlRawText = async (params: ReadRawTextByBuffer): Promise<ReadFileResponse> => {
|
|
const { rawText: html } = readFileRawText(params);
|
|
|
|
const { rawText, imageList } = html2md(html);
|
|
|
|
return {
|
|
rawText,
|
|
imageList
|
|
};
|
|
};
|