dhimasya commented on issue #5306:
URL: https://github.com/apache/camel-quarkus/issues/5306#issuecomment-1722421057

   hi @jamesnetherton thank you for the workaround,
   i think this will cause another issue if the API consumer tries to send the 
file with the same file name on a single request with 2 form input
   > This hack could maybe work using a RouteFilter from 
quarkus-reactive-routes.
   
   and the reference here, why its just drop the form input identifier? it's 
better to push it to the attachment header when we process the request. 
   > Unfortunately, I do not think it is possible with platform-http at 
present. The name of the associated form field is logged and then effectively 
discarded:
   > 
https://github.com/apache/camel/blob/0f68caf93cd05b76abde3c8a58882c039bb7e824/components/camel-platform-http-vertx/src/main/java/org/apache/camel/component/platform/http/vertx/VertxPlatformHttpConsumer.java#L292
   
   i read servlet implementation and its there when i check the header.
   
https://github.com/apache/camel/blob/0f68caf93cd05b76abde3c8a58882c039bb7e824/components/camel-servlet/src/main/java/org/apache/camel/component/servlet/AttachmentHttpBinding.java#L75C75-L75C75
   
   i then try to verify it via
   ```
   quarkus.camel.servlet.url-patterns=/*
   
   const Processor = Java.extend(Java.type("org.apache.camel.Processor"))
   
   from("servlet:/api/v1/upload")
   .process(new Processor(function(e) {   
       var req = 
e.getIn().getBody(Java.type("jakarta.servlet.http.HttpServletRequest"))
      console.log(req)
      console.log(req.getParts())
       
      e.getIn().setBody("ok")
   }))
   ```
   but again, it feel closer, but i got another blocker.
   ```
   org.graalvm.polyglot.PolyglotException: UT010057: multipart config was not 
present on Servlet
           at 
io.undertow.servlet.spec.HttpServletRequestImpl.verifyMultipartServlet(HttpServletRequestImpl.java:520)
           at 
io.undertow.servlet.spec.HttpServletRequestImpl.getParts(HttpServletRequestImpl.java:509)
   ```
   i try to find the way to set / configure this, but not able to find 
properties for the servlet component other than url-pattern.
   
   I hope can submit a PR but I'm really clueless about the tooling and general 
contrib rule here. 


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: commits-unsubscr...@camel.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to