INT-686
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2008 the original author or authors.
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -30,4 +30,6 @@ public abstract class FileHeaders {
|
||||
|
||||
public static final String FILENAME = PREFIX + "name";
|
||||
|
||||
public static final String ORIGINAL_FILE = PREFIX + "originalFile";
|
||||
|
||||
}
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2002-2008 the original author or authors.
|
||||
* Copyright 2002-2009 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -58,6 +58,7 @@ public abstract class AbstractFilePayloadTransformer<T> implements Transformer {
|
||||
T result = this.transformFile(file);
|
||||
Message<?> transformedMessage = MessageBuilder.withPayload(result)
|
||||
.copyHeaders(message.getHeaders())
|
||||
.setHeaderIfAbsent(FileHeaders.ORIGINAL_FILE, file)
|
||||
.setHeaderIfAbsent(FileHeaders.FILENAME, file.getName())
|
||||
.build();
|
||||
if (this.deleteFiles) {
|
||||
|
||||
Reference in New Issue
Block a user