Skip to content

Commit

Permalink
Make media type optional for InputStream when using multipart in REST…
Browse files Browse the repository at this point in the history
… Client

Fixes: quarkusio#43364
  • Loading branch information
geoand committed Sep 23, 2024
1 parent ffd0c78 commit a6cf385
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1964,7 +1964,7 @@ private void addInputStream(BytecodeCreator methodCreator, AssignableResultHandl
methodCreator.invokeVirtualMethod(MethodDescriptor.ofMethod(ClientMultipartForm.class, "entity",
ClientMultipartForm.class, String.class, String.class, Object.class, String.class, Class.class),
multipartForm, formParamResult, partFilenameResult, fieldValue,
methodCreator.load(partType),
methodCreator.load(partType != null ? partType : MediaType.APPLICATION_OCTET_STREAM),
// FIXME: doesn't support generics
methodCreator.loadClassFromTCCL(type)));
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,6 @@ public static class ClientFormUsingByteArray {

public static class ClientFormUsingInputStream {
@FormParam("myFile")
@PartType(APPLICATION_OCTET_STREAM)
@PartFilename(FILE_NAME)
public InputStream file;
}
Expand Down

0 comments on commit a6cf385

Please sign in to comment.