diff --git a/src/main/resources/handlebars/typescript-angular/api.service.mustache b/src/main/resources/handlebars/typescript-angular/api.service.mustache index 93fa863aff..6976139da0 100644 --- a/src/main/resources/handlebars/typescript-angular/api.service.mustache +++ b/src/main/resources/handlebars/typescript-angular/api.service.mustache @@ -285,6 +285,15 @@ export class {{classname}} { // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data useForm = canConsumeForm; {{/isBinary}} +{{^isBinary}} +{{#items}} +{{#isBinary}} + // use FormData to transmit files using content-type "multipart/form-data" + // see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data + useForm = canConsumeForm; +{{/isBinary}} +{{/items}} +{{/isBinary}} {{/formParams}} if (useForm) { formParams = new FormData();