hiteshkaushik28 commented on PR #5977:
URL: https://github.com/apache/camel/pull/5977#issuecomment-2851082454

   @dk2k greetings!!
   
   I am using camel-as2 in one of my projects. The problem I am facing is with 
file attachments.
   This is how I am attaching a file to my exchange:
   ```
   @Override
   public void process(Exchange exchange) throws Exception {
       // other code
       
       
       String fileName = "FFE1235A_PPF070_PPF07000000000000000000000.xml";
       File file = new File(fileName);
       if (!file.exists()) {
           throw new IllegalArgumentException("File not found: " + 
file.getAbsolutePath());
       }
       InputStream inputStream = new FileInputStream(file);
       exchange.getIn().setBody(inputStream, InputStream.class);
       
       
exchange.getIn().setHeader("CamelAs2.attachedFileName","FFE1235A_PPF070_PPF07000000000000000000000.xml");
       // remaining code
   }
   ```
   
   The issue is that while trying to debug the flow, I am not able to see the 
`Content-Disposition: attachment; filename=<name>` header at receiving end. I 
have tried looking both at the outer request headers as well as the 
ApplicationEntity's (EDIFACTEntity in my case) headers.
   Even the mendelson server doesn't log this header.
   
   I am sure I am doing something utterly wrong and silly. Any help is 
appreciated.


-- 
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