From 48d78052d24839bc5645db03ade2876ec871c469 Mon Sep 17 00:00:00 2001 From: Hugo Mercado Date: Wed, 27 Sep 2023 23:22:50 -0500 Subject: [PATCH] fixed error for multiple files request in typescript-angular genrator --- .../handlebars/typescript-angular/api.service.mustache | 9 +++++++++ 1 file changed, 9 insertions(+) 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();