Skip to content

Commit

Permalink
[typescript-angular] Encode objects for multipart/form-data with json -
Browse files Browse the repository at this point in the history
fixes #2733 (#3738)
  • Loading branch information
daniel-sc authored and macjohnny committed Aug 23, 2019
1 parent 73eae09 commit d64ec14
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -342,7 +342,7 @@ export class {{classname}} {
{{/isListContainer}}
{{^isListContainer}}
if ({{paramName}} !== undefined) {
{{#useHttpClient}}formParams = {{/useHttpClient}}formParams.append('{{baseName}}', <any>{{paramName}}){{#useHttpClient}} as any || formParams{{/useHttpClient}};
{{#useHttpClient}}formParams = {{/useHttpClient}}formParams.append('{{baseName}}', {{^isModel}}<any>{{paramName}}{{/isModel}}{{#isModel}}useForm ? JSON.stringify({{paramName}}) : <any>{{paramName}}{{/isModel}}){{#useHttpClient}} as any || formParams{{/useHttpClient}};
}
{{/isListContainer}}
{{/formParams}}
Expand Down

0 comments on commit d64ec14

Please sign in to comment.