Update 6.MessagesSend.ts

Accidentally put /binary instead of octet-stream
This commit is contained in:
Adhiraj
2020-09-23 18:47:50 +05:30
parent f3ecbb11a0
commit 1bc44b4bd9

View File

@@ -123,10 +123,9 @@ export class WAConnection extends Base {
const url = `https://${host.hostname}${MediaPathMap[mediaType]}/${fileEncSha256B64}?auth=${auth}&token=${fileEncSha256B64}`
try {
const urlFetch = await this.fetchRequest(url, 'POST', body, options.uploadAgent, { 'content-type': 'application/binary' })
const urlFetch = await this.fetchRequest(url, 'POST', body, options.uploadAgent, { 'Content-Type': 'application/octet-stream' })
const result = await urlFetch.json()
mediaUrl = result?.url
console.log (result)
if (mediaUrl) break
else {