Skip to content

Feature Enhancement : Add prefix or suffix to file name while the file is getting streamed via SFTP #2955

Open
@sahilmalhotra92

Description

@sahilmalhotra92

Enhancement

I wanted to give a temporary filename to the file placed in remote server while it was getting streamed. I did not have any other option except renaming the file before and after reading the file. It will be very helpful to have a built-in feature to temporary rename file while streaming it.

Gary Russell suggestion to raise issue
https://stackoverflow.com/questions/56470946/add-prefix-or-suffix-to-filename-while-streaming-the-file-using-get-gateway/56478407?noredirect=1#comment99561801_56478407

Code which I tried

     <dependency>
            <groupId>org.springframework.integration</groupId>
            <artifactId>spring-integration-sftp</artifactId>
            <version>5.1.0.RELEASE</version>
        </dependency>
        <dependency>
            <groupId>org.springframework.integration</groupId>
            <artifactId>spring-integration-core</artifactId>
            <version>5.0.6.RELEASE</version>
        </dependency>
Sftp.outboundGateway(sftpSessionFactory(), GET, "payload.remoteDirectory + payload.filename").options(STREAM)

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions