Skip to content

Commit ce5036b

Browse files
fix for watson-developer-cloud#96. convert files without persistence
1 parent 098128b commit ce5036b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

services/document_conversion/v1-experimental.js

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -213,8 +213,16 @@ DocumentConversion.prototype.convert = function(params, callback) {
213213

214214
// send the parameters in the body or as formData depending on the request
215215
if (params.file) {
216-
fixupContentType(params);
217-
parameters.options.formData = params;
216+
fixupContentType(params);
217+
parameters.options.formData = {
218+
file: params.file,
219+
config: {
220+
value: JSON.stringify(omit(params,['file'])),
221+
options: {
222+
contentType: 'application/json; charset=utf-8'
223+
}
224+
}
225+
};
218226
} else {
219227
parameters.options.body = params;
220228
}

0 commit comments

Comments
 (0)