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:
Vendored
+1
@@ -1,6 +1,7 @@
|
|||||||
declare global {
|
declare global {
|
||||||
interface RequestInit {
|
interface RequestInit {
|
||||||
dispatcher?: any
|
dispatcher?: any
|
||||||
|
duplex?: 'half' | 'full'
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -674,6 +674,7 @@ export const getWAUploadToServer = (
|
|||||||
'Content-Type': 'application/octet-stream',
|
'Content-Type': 'application/octet-stream',
|
||||||
Origin: DEFAULT_ORIGIN
|
Origin: DEFAULT_ORIGIN
|
||||||
},
|
},
|
||||||
|
duplex: 'half',
|
||||||
// Note: custom agents/proxy require undici Agent; omitted here.
|
// Note: custom agents/proxy require undici Agent; omitted here.
|
||||||
signal: timeoutMs ? AbortSignal.timeout(timeoutMs) : undefined
|
signal: timeoutMs ? AbortSignal.timeout(timeoutMs) : undefined
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user