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

* perf: worker pool * perf: worker register * perf: worker controller * perf: system plugin worker * perf: system plugin worker * perf: worker * perf: worker * worker timeout * perf: copy icon
19 lines
440 B
TypeScript
19 lines
440 B
TypeScript
import { ReadRawTextByBuffer, ReadFileResponse } from '../type';
|
|
// import { parseOfficeAsync } from 'officeparser';
|
|
import { parseOffice } from '../parseOffice';
|
|
|
|
export const readPptxRawText = async ({
|
|
buffer,
|
|
encoding
|
|
}: ReadRawTextByBuffer): Promise<ReadFileResponse> => {
|
|
const result = await parseOffice({
|
|
buffer,
|
|
encoding: encoding as BufferEncoding,
|
|
extension: 'pptx'
|
|
});
|
|
|
|
return {
|
|
rawText: result
|
|
};
|
|
};
|