camel-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Claus Ibsen">
Subject HEADS-UP - Camel 1.4 - FTPConsumer changed defaults to use ftp filenames out-of-the-box
Date Sun, 06 Apr 2008 13:29:32 GMT
We are changing a default option on the FTPConsumer in Camel 1.4.

Camel 1.3

Camel 1.4

The issue is tracked in CAMEL-420.

The issue is that Camel in v1.3 or below does not default to use the
filenames from the downloaded files from the FTP Server. So you as the
end user have to explicity set a filename if you want to eg. store the
downaloded file directly to a local file etc using the File component.

An example (Camel 1.3)

String fileUrl = "file:target/ftptest/?append=false&noop=true";
String ftpUrl =


In the example above we have to set an filename using the setHeader
option with the special key FileComponent.HEADER_FILE_NAME

If we just want to use the filename from the FTP Server we have to do
this in Camel 1.3. Set the setNames option to true. So the ftpUrl is:

String ftpUrl =

In Camel 1.4 the default value of consumer.setNames is true as opposed
to false in Camel 1.3

So in Camel 1.4 it works out of the box that Camel will use the filename
from the FTP Server if you have not explicity set a new filename using
the setHeader(FileComponent.HEADER_FILE_NAME, "mynewfilename.txt")

So the Camel 1.4 example is:

String fileUrl = "file:target/ftptest/?append=false&noop=true";
String ftpUrl =



View raw message