Open FeynmanNg opened 5 years ago
i aslo facing same problem too , i want to send single multipart file with additional params , Already I tried few methods does nt work please let me any https://stackoverflow.com/questions/60451564/error-while-uploading-file-using-openfeign-the-request-was-rejected-because-no here am attaching the error and smaple code
@Headers({ 'Content-Type': 'multipart/form-data' }) @POST('/apps') addApk(@Body formData: FormData, @Query('params') params: { version: string, description: string }): Observable<Result<{ id: number, type: string, url: string }>> { return null; }
---service end---this.service.add(formData, { version : this.formCache.version, description: this.formCache.description }).subscribe( res => { // ... }, err => { // ... } );
--- component end---when I post a upload request, here's my feedback: Failed to parse multipart servlet request; nested exception is java.io.IOException: org.apache.tomcat.util.http.fileupload.FileUploadException: the request was rejected because no multipart boundary was found
should I add the bounary by myself ?