quarkus: REST Reactive Client: PartFilename annotation doesn't work if member is anything else than java.io.File
Describe the bug
I have tested the new @PartFilename annotation in the REST Reactive client (Quarkus 2.7.0.CR1). See issue #22658 However, the annotation seems to work only if the respective annotated member is of type java.io.File. I tested with java.nio.Buffer and java.lang.String. If one of these two types is used, the file name is not transferred.
Works as expected:
public class OurForm {
@FormParam("files")
@PartFilename("document.txt")
@PartType(MediaType.TEXT_PLAIN)
private File documentFile;
}
Doesn’t work:
public class OurForm {
@FormParam("files")
@PartFilename("document.txt")
@PartType(MediaType.TEXT_PLAIN)
private String documentFile;
}
public class OurForm {
@FormParam("files")
@PartFilename("document.txt")
@PartType(MediaType.TEXT_PLAIN)
private Buffer documentFile;
}
Expected behavior
No response
Actual behavior
No response
How to Reproduce?
No response
Output of uname -a or ver
No response
Output of java -version
No response
GraalVM version (if different from Java)
2.7.0.CR1
Quarkus version or git rev
No response
Build tool (ie. output of mvnw --version or gradlew --version)
No response
Additional information
No response
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 17 (17 by maintainers)
Commits related to this issue
- Fix @PartType ignored for String types in Resteasy Rest Client Fix https://github.com/quarkusio/quarkus/issues/23059 — committed to Sgitario/quarkus by Sgitario a year ago
- Fix @PartType ignored for String types in Resteasy Rest Client Fix https://github.com/quarkusio/quarkus/issues/23059 — committed to maxandersen/quarkus by Sgitario a year ago
I have a fix for this issue, coming soon…
Thanks, we’ll have a look soon (cc @Sgitario )
I understand. I’ll see what I can do. Thanks for now @FroMage and @geoand.