You may want to use the splitter eip so after step 2, you split the
message body into N files and each file is uploaded. So if you have a
List<InputStream> at step 2, then the splitter can split the list out
of the box, and each InputStream is used for uploading to FTP.

However if you want to control the file name also, then you need to
set the CamelFileName header for each splitted message to the name you
want

from
 to
 split(body())
  setHeader(CamelFileName, someStuffHere)
  to ftp

See about splitter here
http://camel.apache.org/splitter


On Sat, Nov 21, 2015 at 2:19 PM, rwijngaa
<[email protected]> wrote:
> Hi, i've developed a simplified camellish DSL for my end-users in which they
> can basically specify
> how they want files to be moved around. For the most part this works great,
> but i don't have
> a solution yet for the case where i read just one file and the end result is
> N files.
>
> For example this scenario:
>
> <from uri="path-to-zip-file" />
> <processor bean="unzipAndMoreMagic" />
> <to uri="ftp-site" />
>
> This is broken down to 3 parts:
> 1) read a zip file
> 2) unzip it to local file system
> 3) send every file (can be more than one) from local filesystem to ftp
> endpoint
>
> 1) and 2) are solved. But 3) is the problem here. How do i put the unzipped
> file(s) on it's way to
> the ftp end point?. One file is no problem, i just can do setBody(File) ...
> But, can i just set multiple body's (streams) on the exchange
> setBody(List<InputStream) and it will magicall work?
>
> Thanks in advance!
> Regards
> Rino
>
>
>
>
>
>
>
>
> --
> View this message in context: 
> http://camel.465427.n5.nabble.com/ftp-multiple-streams-in-body-tp5774197.html
> Sent from the Camel - Users mailing list archive at Nabble.com.



-- 
Claus Ibsen
-----------------
http://davsclaus.com @davsclaus
Camel in Action 2: https://www.manning.com/ibsen2

Reply via email to