apistore-sms
Advanced tools
Comparing version 0.7.30 to 0.7.31
@@ -16,2 +16,3 @@ /* | ||
*/ | ||
var fs = require('fs'); | ||
var _ = require('lodash'); | ||
@@ -21,3 +22,2 @@ var r = require('request-promise'); | ||
var APISTORE_SMS_HOST = 'http://api.openapi.io/ppurio/1/message'; | ||
@@ -136,6 +136,10 @@ | ||
// form.file should be a stream. | ||
// form.file should be a stream or a filepath. | ||
// ex) form.file = fs.createReadStream('./example.jpg') | ||
if (form.file) | ||
newForm[ 'file' ] = form.file; | ||
if (form.file) { | ||
if (typeof form.file === 'string') | ||
newForm[ 'file' ] = fs.createReadStream(form.file); | ||
else | ||
newForm[ 'file' ] = form.file; | ||
} | ||
@@ -142,0 +146,0 @@ if (form.from) newForm[ 'send_phone' ] = form.from; |
{ | ||
"name": "apistore-sms", | ||
"version": "0.7.30", | ||
"version": "0.7.31", | ||
"description": "Send SMS with Node.js via API Store SMS service.", | ||
@@ -5,0 +5,0 @@ "main": "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
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
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
17551
226
1