spring-projects / spring-projects/spring-integration

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

Open
#2,955 11 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

in: sftp type: enhancement
Dominant language
Java
Stars
1.6k
Forks
1.2k
Avg merge
17h 48m
Merged PRs (30d)
62

Description

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)

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the SFTP outbound gateway configuration shown in the issue, especially the STREAM option and the spring-integration-sftp dependency. Determine where a configurable temporary prefix or suffix would apply while the remote file is streamed. Done means streaming can use the temporary name without requiring manual renames before and after the transfer.

Written by the indexing model from the issue text.

Assessment

Tech stack
java, spring
Domain
backend, networking
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.