mirror of
https://github.com/labring/FastGPT.git
synced 2025-08-04 14:08:15 +00:00
@@ -18,7 +18,10 @@ const rawEncodingList = [
|
||||
];
|
||||
|
||||
// 加载源文件内容
|
||||
export const readFileRawText = ({ buffer, encoding }: ReadRawTextByBuffer): ReadFileResponse => {
|
||||
export const readFileRawText = async ({
|
||||
buffer,
|
||||
encoding
|
||||
}: ReadRawTextByBuffer): Promise<ReadFileResponse> => {
|
||||
const content = (() => {
|
||||
try {
|
||||
if (rawEncodingList.includes(encoding)) {
|
||||
|
Reference in New Issue
Block a user