Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mailgun-js

Package Overview
Dependencies
Maintainers
1
Versions
80
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mailgun-js - npm Package Compare versions

Comparing version 0.19.0 to 0.20.0

26

lib/request.js

@@ -252,12 +252,20 @@ const https = require('https')

} else if (attachmentType === 'stream') {
if (obj.knownLength && obj.contentType) {
debug('appending attachment stream to form data. key: %s filename: %s', key, obj.filename)
if ((obj.knownLength && !obj.contentType) || (!obj.knownLength && obj.contentType)) {
debug('missing content type or length for attachment stream. key: %s', key)
} else {
debug('appending attachment stream to form data. key: %s', key)
this.form.append(key, obj.data, {
'filename': obj.filename || 'attached file',
'contentType': obj.contentType,
'knownLength': obj.knownLength
})
} else {
debug('missing content type or length for attachment stream. key: %s', key)
// add all known options
let formOpts = {}
if (obj.filename) {
formOpts.filename = obj.filename
}
if (obj.contentType) {
formOpts.contentType = obj.contentType
}
if (obj.knownLength) {
formOpts.knownLength = obj.knownLength
}
this.form.append(key, obj.data, formOpts)
}

@@ -264,0 +272,0 @@ }

@@ -8,3 +8,3 @@ {

],
"version": "0.19.0",
"version": "0.20.0",
"homepage": "https://github.com/bojand/mailgun-js",

@@ -11,0 +11,0 @@ "license": "MIT",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc