Skip to Content
avatar image
Former Member

Issue getting the additional filename details pulled from SFTP Sender Channel.

Hi All,

I have a scenario to pull one .XML file as main payload and multiple .doc / .pdf / .jpg files as attachments.

Configured SFTP sender to have additional files to pull attachments in the message.

The issue here is all the attachment's content type are getting defaulted to (application.xml) irrespective of the attachment extensions (.pdf,.jpeg..) which is causing an issue while sending it to target system.

The dynamic configuration in SFTP channel has no details of the additional files, the only details available are of the actual file.

Is there a way where we can get the additional file name details in dynamic configuration ? or a way to get the attachment name within java mapping so that I can set the content type reading each attachment name.

Couldn't find any option to get the attachment name within the API.

Thanks in advance.

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

2 Answers

  • Best Answer
    Dec 02, 2016 at 02:57 AM

    Add multipartheaderbea in sender channel and you can see the attachment name in DC then you may read those via java in mapping.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Manoj,

      Thanks for the inputs , adding the MultipartHeaderBean worked in setting up the dynamic configuration for the additional files read from SFTP." name="Part[1].Content-Disposition">attachment;filename=" PO_12345.pdf"" name="Part[2].Content-Disposition">attachment;filename="PO_12345.jpg"

  • Dec 02, 2016 at 03:26 AM

    Hi Kowshik!

    Manoj is absolutely right: you can add attachment's properties to Dynamic Configuration using MultipartHeaderBean.

    Another option is to use custom adapter module to get the same data using class to read attachment's properties.

    Regards, Evgeniy.

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Hi Evgeniy,

      Thanks for your time in replying , As suggested by Manoj "MultipartHeaderBean" did the trick and relied on java mapping to read the filename from the dynamic configuration.