gamepop
gamepop

Reputation: 434

spring-cloud-starter-stream-sink-sftp Sftp Sink , file-expression is not working

I am using stfp sink and trying to name the remote file based on header. I am providing following property to name the file on remote

sftp.file-expression=payload.headers['id'] + payload.headers['file_name']

I also tried sftp.file-expression=headers['id'] + headers['file_name']

but these is not working and in remote the original filename is kept. Is this the right way to write SpEL expression. Also I don't get any error with this property except the prope

Upvotes: 1

Views: 256

Answers (1)

Artem Bilan
Artem Bilan

Reputation: 121177

Must be sftp.filename-expression:

sftp.filename-expression

          A SpEL expression to generate the remote file name. (Expression, default: <none>)

http://docs.spring.io/spring-cloud-stream-app-starters/docs/Bacon.RELEASE/reference/html/spring-cloud-stream-modules-sinks.html#_options_50

Upvotes: 1

Related Questions