fix: remove explicit Content-Type header in file upload (#11231)

The Content-Type header was removed from the fetch request when uploading files. This change may allow the server to infer the correct content type or handle uploads more flexibly.
This commit is contained in:
Pleasure1234
2025-11-10 15:28:38 +00:00
committed by GitHub
parent c1fa24522d
commit ce5d46bfc7

View File

@@ -275,15 +275,10 @@ export default class MineruPreprocessProvider extends BasePreprocessProvider {
try {
const fileBuffer = await fs.promises.readFile(filePath)
// https://mineru.net/apiManage/docs
const response = await net.fetch(uploadUrl, {
method: 'PUT',
body: fileBuffer,
headers: {
'Content-Type': 'application/pdf'
}
// headers: {
// 'Content-Length': fileBuffer.length.toString()
// }
body: fileBuffer
})
if (!response.ok) {