Comparing version 9.0.4 to 9.0.5
@@ -30,2 +30,3 @@ // Licensed under the Apache License, Version 2.0 (the 'License'); you may not | ||
const ChangesReader = require('./changesreader.js') | ||
const MultiPartFactory = require('./multipart.js') | ||
@@ -286,3 +287,7 @@ function isEmpty (val) { | ||
if (opts.multipart) { | ||
req.multipart = opts.multipart | ||
// generate the multipart/related body, header and boundary to | ||
// upload multiple binary attachments in one request | ||
const mp = new MultiPartFactory(opts.multipart) | ||
opts.contentType = mp.header | ||
req.body = mp.data | ||
} | ||
@@ -896,8 +901,9 @@ | ||
} | ||
multipart.push({ body: att.data }) | ||
multipart.push(att) | ||
}) | ||
multipart.unshift({ | ||
'content-type': 'application/json', | ||
body: JSON.stringify(doc) | ||
content_type: 'application/json', | ||
data: JSON.stringify(doc), | ||
name: 'document' | ||
}) | ||
@@ -904,0 +910,0 @@ |
@@ -7,3 +7,3 @@ { | ||
"repository": "http://github.com/apache/couchdb-nano", | ||
"version": "9.0.4", | ||
"version": "9.0.5", | ||
"author": "Apache CouchDB <dev@couchdb.apache.org> (http://couchdb.apache.org)", | ||
@@ -10,0 +10,0 @@ "keywords": [ |
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
176710
12
2956