Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8644

Re: PI 7.3: routing .jpg files using SFTP Adapter module

$
0
0

Hi Peter,

 

If you are keen on extending the functionality of your module then you could modify the code and add the following logic after setting the main payload:

 

 

1) Loop and pick up each JPG file

     1a) Create a new binary payload by calling the factory method Message.createPayload()

     1b) With the new Payload object returned by 1a), call setContent with the binary byte array

     1c) With the new Payload object returned by 1a), call setName with the JPG file name

     1d) With the new Payload object returned by 1a), call msg.addAttachment with the payload object

 

 

Your receiver will now need to handle attachments however so you will probably need to introduce a mapping.

 

 

Hope this helps. Let us know how you go with it.

 

 

Regards,

Nick


Viewing all articles
Browse latest Browse all 8644

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>