Skip to content

Commit 811cac5

Browse files
authored
Merge pull request #1188 from swagger-api/codegen-issue-9993
fixed error for multiple files request in typescript-angular genrator
2 parents b884c48 + 48d7805 commit 811cac5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/main/resources/handlebars/typescript-angular/api.service.mustache

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,15 @@ export class {{classname}} {
285285
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
286286
useForm = canConsumeForm;
287287
{{/isBinary}}
288+
{{^isBinary}}
289+
{{#items}}
290+
{{#isBinary}}
291+
// use FormData to transmit files using content-type "multipart/form-data"
292+
// see https://stackoverflow.com/questions/4007969/application-x-www-form-urlencoded-or-multipart-form-data
293+
useForm = canConsumeForm;
294+
{{/isBinary}}
295+
{{/items}}
296+
{{/isBinary}}
288297
{{/formParams}}
289298
if (useForm) {
290299
formParams = new FormData();

0 commit comments

Comments
 (0)