mirror of
https://github.com/labring/FastGPT.git
synced 2025-07-23 21:13:50 +00:00
19 lines
446 B
TypeScript
19 lines
446 B
TypeScript
import { ReadFileByBufferParams, ReadFileResponse } from './type.d';
|
|
// import { parseOfficeAsync } from 'officeparser';
|
|
import { parseOffice } from './parseOffice';
|
|
|
|
export const readPptxRawText = async ({
|
|
buffer,
|
|
encoding
|
|
}: ReadFileByBufferParams): Promise<ReadFileResponse> => {
|
|
const result = await parseOffice({
|
|
buffer,
|
|
encoding: encoding as BufferEncoding,
|
|
extension: 'pptx'
|
|
});
|
|
|
|
return {
|
|
rawText: result
|
|
};
|
|
};
|