We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 347368e commit dfbcd5eCopy full SHA for dfbcd5e
1 file changed
src/index.js
@@ -127,13 +127,15 @@ HTTPSnippet.prototype.prepare = function (request) {
127
if (request.postData.params) {
128
var form = new MultiPartForm()
129
130
- request.postData.params.forEach(function (param) {
131
- form.append(param.name, param.value || '', {
+ const { value } = param || ''
+ form.append(param.name,
132
+ typeof value === 'string'
133
+ ? new Blob([value])
134
+ : value
135
+ , {
136
filename: param.fileName || null,
137
contentType: param.contentType || null
138
})
- })
-
139
// form.pipe(es.map(function (data, cb) {
140
// request.postData.text += data
141
// }))
0 commit comments