Update ConvertToTxtComponent.vue
修复pdf无法转换文字
This commit is contained in:
parent
3194799ff5
commit
6f9a1b4850
@ -95,7 +95,7 @@ const convertPdfToText = async () => {
|
|||||||
const response = await fetch('/api/tool/pdf2txt', {
|
const response = await fetch('/api/tool/pdf2txt', {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: { 'Content-Type': 'application/json' },
|
headers: { 'Content-Type': 'application/json' },
|
||||||
body: JSON.stringify({ file: file })
|
body: JSON.stringify(file.toString())
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!response.ok) {
|
if (!response.ok) {
|
||||||
@ -180,4 +180,4 @@ const convertPdfToText = async () => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</style>
|
</style>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user