mirror of
https://github.com/CherryHQ/cherry-studio.git
synced 2026-01-07 13:59:28 +08:00
fix: update file upload body type in MineruPreprocessProvider
- Changed the body of the fetch request from a Buffer to a Uint8Array to ensure proper handling of binary data during PDF uploads.
This commit is contained in:
parent
9f944ff42c
commit
287bab75f6
@ -273,7 +273,7 @@ export default class MineruPreprocessProvider extends BasePreprocessProvider {
|
|||||||
|
|
||||||
const response = await fetch(uploadUrl, {
|
const response = await fetch(uploadUrl, {
|
||||||
method: 'PUT',
|
method: 'PUT',
|
||||||
body: fileBuffer,
|
body: new Uint8Array(fileBuffer),
|
||||||
headers: {
|
headers: {
|
||||||
'Content-Type': 'application/pdf'
|
'Content-Type': 'application/pdf'
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user