fix: set duplex property when uploading media to server (#1837)

* fix: set duplex to half in getWAUploadToServer

* fix: add duplex to RequestInit interface
This commit is contained in:
Charlotte
2025-10-01 01:55:50 -03:00
committed by GitHub
parent 096994b927
commit 9f6e1d954f
2 changed files with 2 additions and 0 deletions
+1
View File
@@ -1,6 +1,7 @@
declare global {
interface RequestInit {
dispatcher?: any
duplex?: 'half' | 'full'
}
}
+1
View File
@@ -674,6 +674,7 @@ export const getWAUploadToServer = (
'Content-Type': 'application/octet-stream',
Origin: DEFAULT_ORIGIN
},
duplex: 'half',
// Note: custom agents/proxy require undici Agent; omitted here.
signal: timeoutMs ? AbortSignal.timeout(timeoutMs) : undefined
})