To reproduce, start the demo:
mvn compile quarkus:dev
Test the different scenarios:
curl -X 'POST' \
'http://localhost:8080/hello' \
-H 'accept: */*' \
-H 'Content-Type: multipart/form-data' \
-F 'resources=@src/main/resources/img1.jpg;type=image/jpeg' \
-F 'resources=@src/main/resources/img2.jpg;type=image/jpeg'
Output:
img1.jpg: 38149; img2.jpg: 58320;
curl -X 'GET' \
'http://localhost:8080/hello' \
-H 'accept: */*'
Output (empty) because files are not written to the request:
curl -X 'GET' \
'http://localhost:8080/hello/single' \
-H 'accept: */*'
Output:
img1.jpg: 38149;