String name = (String) names.nextElement();
Object object = request.getAttribute(name);
LOG.trace("HTTP attachment {} = {}", name, object);
if (object instanceof File) {
String fileName = request.getParameter(name);
message.addAttachment(fileName, new DataHandler(new CamelFileDataSource((File)object, fileName)));
}
}
}