When using streaming FileMessageAdaptor with a FileInputStream payload is used by default.
When not using streaming FileContentsMessageAdaptor is used with a byte[] payload is used by default.
Since work on the file transport to make streaming work correctly it is no longer possible to pass a java.io.File payload.
We either need to:
i) Create a 3rd message adaptor for this case (which I suppose would only be used when overriding defaults)
ii) Make the FileMessageAdaptor a bit more intelligent so if it is created with a File getPayload() returns a file, and it is was created with a FileInputStream it returns a FileInputStream when getPayload() is called.
<service-overrides messageAdapter="org.mule.transport.file.FileObjectMessageAdapter"/>
</file:connector
I've attached a new message adapter (incl. test case) which returns as payload the file object.
regards
markus