You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a problem with generated code in case of using Multipart/Formdata
There is a need generated code to be in form updateUsingPOSTResponse(params: DefinitionMetadataResourceService.UpdateDefinitionUsingPOSTParams): __Observable<__StrictHttpResponse<Array<MetadataDTO>>> { let __params = this.newParams(); let __headers = new HttpHeaders(); let __body: any = null; __headers.append('Content-Type', 'multipart/form-data'); let __formData = new FormData(); __body = __formData; if(params.definitionId !== null && typeof params.definitionId !== "undefined") { __formData.append('definitionId', params.definitionId as string | Blob);} if(params.tableResources !== null && typeof params.tableResources !== "undefined") { __formData.append('tableResources', params.tableResources as string | Blob, this is missing -> params.name);} if(params.fileResources !== null && typeof params.fileResources !== "undefined") { __formData.append('fileResources', params.fileResources as string | Blob, this is missing -> params.name);} let req = new HttpRequest<any>( 'POST', this.rootUrl + /api/definitions/update, __body, { headers: __headers, params: __params, responseType: 'json' }); return this.http.request<any>(req).pipe( __filter(_r => _r instanceof HttpResponse), __map((_r) => { return _r as __StrictHttpResponse<Array<MetadataDTO>>; }) ); }
so basically we need 3rd param to formdata.append in order code to work in IE
more about issue https://developer.mozilla.org/en-US/docs/Web/API/FormData/append
section for IE notes With the "Include local directory pass when uploading files to a server" option enabled, IE will change the filename inside the Blob on the fly. To have direct control of the sent filename, the developer should send the filename as the third parameter value, i.e. formData.append(name, value, filename).
The text was updated successfully, but these errors were encountered:
There is a problem with generated code in case of using Multipart/Formdata
There is a need generated code to be in form
updateUsingPOSTResponse(params: DefinitionMetadataResourceService.UpdateDefinitionUsingPOSTParams): __Observable<__StrictHttpResponse<Array<MetadataDTO>>> { let __params = this.newParams(); let __headers = new HttpHeaders(); let __body: any = null; __headers.append('Content-Type', 'multipart/form-data'); let __formData = new FormData(); __body = __formData; if(params.definitionId !== null && typeof params.definitionId !== "undefined") { __formData.append('definitionId', params.definitionId as string | Blob);} if(params.tableResources !== null && typeof params.tableResources !== "undefined") { __formData.append('tableResources', params.tableResources as string | Blob
, this is missing -> params.name);} if(params.fileResources !== null && typeof params.fileResources !== "undefined") { __formData.append('fileResources', params.fileResources as string | Blob
, this is missing -> params.name);} let req = new HttpRequest<any>( 'POST', this.rootUrl +
/api/definitions/update, __body, { headers: __headers, params: __params, responseType: 'json' }); return this.http.request<any>(req).pipe( __filter(_r => _r instanceof HttpResponse), __map((_r) => { return _r as __StrictHttpResponse<Array<MetadataDTO>>; }) ); }
so basically we need 3rd param to formdata.append in order code to work in IE
more about issue
https://developer.mozilla.org/en-US/docs/Web/API/FormData/append
section for IE notes
With the "Include local directory pass when uploading files to a server" option enabled, IE will change the filename inside the Blob on the fly. To have direct control of the sent filename, the developer should send the filename as the third parameter value, i.e. formData.append(name, value, filename).
The text was updated successfully, but these errors were encountered: