mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
Update 6.MessagesSend.ts
Accidentally put /binary instead of octet-stream
This commit is contained in:
@@ -123,10 +123,9 @@ export class WAConnection extends Base {
|
|||||||
const url = `https://${host.hostname}${MediaPathMap[mediaType]}/${fileEncSha256B64}?auth=${auth}&token=${fileEncSha256B64}`
|
const url = `https://${host.hostname}${MediaPathMap[mediaType]}/${fileEncSha256B64}?auth=${auth}&token=${fileEncSha256B64}`
|
||||||
|
|
||||||
try {
|
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()
|
const result = await urlFetch.json()
|
||||||
mediaUrl = result?.url
|
mediaUrl = result?.url
|
||||||
console.log (result)
|
|
||||||
|
|
||||||
if (mediaUrl) break
|
if (mediaUrl) break
|
||||||
else {
|
else {
|
||||||
|
|||||||
Reference in New Issue
Block a user