Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
赵月辉
/
fastgpt-migrated
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Members
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Unverified
Commit
fb0eb491
authored
Feb 27, 2025
by
Archer
Committed by
GitHub
Feb 27, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: pptx encoding (#3905)
parent
27ebd2e8
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
4 deletions
+8
-4
docSite/content/zh-cn/docs/development/upgrading/4823.md
+2
-0
packages/service/worker/readFile/parseOffice.ts
+6
-4
No files found.
docSite/content/zh-cn/docs/development/upgrading/4823.md
View file @
fb0eb491
...
@@ -27,3 +27,4 @@ weight: 802
...
@@ -27,3 +27,4 @@ weight: 802
1.
标签过滤时,子文件夹未成功过滤。
1.
标签过滤时,子文件夹未成功过滤。
2.
暂时移除 md 阅读优化,避免链接分割错误。
2.
暂时移除 md 阅读优化,避免链接分割错误。
3.
离开团队时,未刷新成员列表。
3.
离开团队时,未刷新成员列表。
4.
PPTX 编码错误,导致解析失败。
\ No newline at end of file
packages/service/worker/readFile/parseOffice.ts
View file @
fb0eb491
...
@@ -45,10 +45,12 @@ const parsePowerPoint = async ({
...
@@ -45,10 +45,12 @@ const parsePowerPoint = async ({
// Returning an array of all the xml contents read using fs.readFileSync
// Returning an array of all the xml contents read using fs.readFileSync
const
xmlContentArray
=
await
Promise
.
all
(
const
xmlContentArray
=
await
Promise
.
all
(
files
.
map
((
file
)
=>
{
files
.
map
(
async
(
file
)
=>
{
return
fs
.
promises
.
readFile
(
`
${
decompressPath
}
/
${
file
.
path
}
`
,
encoding
).
catch
(()
=>
{
try
{
return
fs
.
promises
.
readFile
(
`
${
decompressPath
}
/
${
file
.
path
}
`
,
'utf-8'
);
return
await
fs
.
promises
.
readFile
(
`
${
decompressPath
}
/
${
file
.
path
}
`
,
encoding
);
});
}
catch
(
err
)
{
return
await
fs
.
promises
.
readFile
(
`
${
decompressPath
}
/
${
file
.
path
}
`
,
'utf-8'
);
}
})
})
);
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment