@andrey4emk/npm-app-back-b24 0.6.7 → 0.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/sendMessage/wappi.js +3 -3
package/package.json
CHANGED
package/sendMessage/wappi.js
CHANGED
|
@@ -126,10 +126,10 @@ export class Wappi {
|
|
|
126
126
|
|
|
127
127
|
body: JSON.stringify({
|
|
128
128
|
recipient: phone,
|
|
129
|
-
|
|
129
|
+
// ! url: fileUrl,
|
|
130
130
|
file_name: fileName,
|
|
131
131
|
caption: message,
|
|
132
|
-
|
|
132
|
+
b64_file: base64,
|
|
133
133
|
}),
|
|
134
134
|
});
|
|
135
135
|
let data = await res.json();
|
|
@@ -282,7 +282,7 @@ export class Wappi {
|
|
|
282
282
|
const buffer = Buffer.from(arrayBuffer);
|
|
283
283
|
|
|
284
284
|
const base64String = buffer.toString("base64");
|
|
285
|
-
return { error: false,
|
|
285
|
+
return { error: false, data: base64String };
|
|
286
286
|
} catch (error) {
|
|
287
287
|
return { error: true, message: `Ошибка при скачивании и конвертировании в base64 файла по fileUrl: ${error.message}` };
|
|
288
288
|
}
|