@flowko/wh-wrapper
Advanced tools
Comparing version 0.0.11 to 0.0.12
@@ -699,3 +699,3 @@ "use strict"; | ||
data.append("messaging_product", "whatsapp"); | ||
if (media.startsWith("http")) { | ||
if (media.startsWith("http") || media.startsWith("data")) { | ||
const response = await axios_1.default.get(media, { responseType: "arraybuffer" }); | ||
@@ -711,3 +711,3 @@ const mimeType = response.headers["content-type"]; | ||
if (!fs_1.default.existsSync(media)) | ||
throw new Error("חובה לספק נתיב קובץ תקין"); | ||
throw new Error("A valid file path must be provided"); | ||
data.append("file", fs_1.default.createReadStream(media)); | ||
@@ -714,0 +714,0 @@ } |
{ | ||
"name": "@flowko/wh-wrapper", | ||
"version": "0.0.11", | ||
"version": "0.0.12", | ||
"description": "JavaScript wrapper for the WhatsApp Cloud API", | ||
@@ -5,0 +5,0 @@ "main": "lib/index.js", |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
162074