mirror of
https://github.com/FranP-code/Baileys.git
synced 2025-10-13 00:32:22 +00:00
fix: allow media upload retries
This commit is contained in:
@@ -606,7 +606,7 @@ export const getWAUploadToServer = (
|
||||
{ customUploadHosts, fetchAgent, logger, options }: SocketConfig,
|
||||
refreshMediaConn: (force: boolean) => Promise<MediaConnInfo>,
|
||||
): WAMediaUploadFunction => {
|
||||
return async(stream, { mediaType, fileEncSha256B64, timeoutMs }) => {
|
||||
return async(filePath, { mediaType, fileEncSha256B64, timeoutMs }) => {
|
||||
// send a query JSON to obtain the url & auth token to upload our media
|
||||
let uploadInfo = await refreshMediaConn(false)
|
||||
|
||||
@@ -626,7 +626,7 @@ export const getWAUploadToServer = (
|
||||
|
||||
const body = await axios.post(
|
||||
url,
|
||||
stream,
|
||||
createReadStream(filePath),
|
||||
{
|
||||
...options,
|
||||
maxRedirects: 0,
|
||||
|
||||
Reference in New Issue
Block a user