It’s ok, but what if I have the spring boot project and deploy it in a server than doesn’t reach the dev sftp server in junit test, how can i mock a sftp server connection in junit tests?
Yes it is. If you want to control it your self then use Apache Common FTPClient commons.apache.org/proper/commons-net/apidocs/org/apache/commons/net/ftp/FTPClient.html
This is very helpful to understand the concept. How do I download multiple files from the SFTP folder? Can I do a loop over filenames after fetching them from the remote folder?
How do we deal with scanning the files we upload into server? We basically uploaded the file and antivirus was running continuously and we would sort of wait for few seconds and if they were still present, the file is good and if they were not we would mark the file entry in db as invalid and user has to upload again.
Getting an error at return from gimmeFactory() The error is NoSuchMethodError: org.springframework.integration.util.Javautils.acceptIfHasText(etc etc) Basically acceptIfHasText throws the error inside the DefaultSftpSessionFactory.class I wonder if it has something to do about jschSession::setConfig. I use maven and I have installed the dependency as seen in the official spring doc, SFTP Adapters. If you could help it would be great. You have awesome content in your channel!
I am facing a problem the file is getting partially written. Only 32.6 Kb is getting written to the remote server.. The written file is corrupted.. How do we resolve this? Is there a file size limit?
It's not a maxUploadSizeExceeded exception... It is truncating characters after 32kb..Its basically a problem with the jcraft jar which spring uses internally.. ChannelSftp.put... after the sessiontimeout of 30s u get an IOException Stream Closed.. Not sure how to resolve this..
Hi Solai. When I have time I will show an example with spring integration sftp and the annotation like @Gateway and @MessagingGateway. :-) Thank you for watching.
Thank you for this amazing Video! ^^ You were a great help!
No problem 😊 Thanks for watching
It’s ok, but what if I have the spring boot project and deploy it in a server than doesn’t reach the dev sftp server in junit test, how can i mock a sftp server connection in junit tests?
Use Mockito. I have a video on that.
How to implement expect-ct header in spring with report-uri
Please make on video
I have quite a long back log... But... Added to backlog.
Can you please 1 video how we setup this demo surver as well ty
Clone the project and use the docker-compose file to start up filezilla sftp server.
Any example of connecting sftp server using private key file using camel.
Excellent idea! I will dig into Camel soon. Added to backlog.
Hi,
What about the session closure is that handled by spring itself
Yes it is. If you want to control it your self then use Apache Common FTPClient commons.apache.org/proper/commons-net/apidocs/org/apache/commons/net/ftp/FTPClient.html
This is very useful to understand.
Thank you for watching and commenting:)
This is very helpful to understand the concept. How do I download multiple files from the SFTP folder? Can I do a loop over filenames after fetching them from the remote folder?
Yes thats quite easy. Ill see if I have time to create a video about that soon.
@@MikesTechCorner Thanks for your response!!
@@arnabmukherjee4513 ill make another video when I have time
How do we deal with scanning the files we upload into server? We basically uploaded the file and antivirus was running continuously and we would sort of wait for few seconds and if they were still present, the file is good and if they were not we would mark the file entry in db as invalid and user has to upload again.
You dont scan the "uploading"-folder. Then the client moves the file from "uploading" to "done" and then you scan the "done" directory.
how about streaming a large file from sftp server. Don't want to download entire file locally
Added to backlog
DO you have an example connecting through FTPS?
No. Use sftp instead! Ill make an example with Spring Integration soon.
you dont recommend using FTPS?
it could be nice if you also have an example with FTPS. thanks for the video Mike!
@@JedColina ok ill make a ftps video
@@MikesTechCorner DId you made with FTPS as well ? i am interested in it
Hi sir, how to connect filezilla before running project, i'm so confused ?
Filezilla is the client / GUI to connect to a sftp server. Just like my Spring app is a client of a sftp server. I spin up a sftp server using docker.
how to download the file and store in a location? instead of reading the content...
Try to watch the other sftp videos. "... Storage..."
@@MikesTechCorner where is video you mean Mr @Mike
Search in my channel :) sftp
Getting an error at return from gimmeFactory()
The error is NoSuchMethodError: org.springframework.integration.util.Javautils.acceptIfHasText(etc etc)
Basically acceptIfHasText throws the error inside the DefaultSftpSessionFactory.class
I wonder if it has something to do about jschSession::setConfig.
I use maven and I have installed the dependency as seen in the official spring doc, SFTP Adapters.
If you could help it would be great.
You have awesome content in your channel!
Try to clone my project and run the code again.
I am facing a problem the file is getting partially written. Only 32.6 Kb is getting written to the remote server.. The written file is corrupted.. How do we resolve this?
Is there a file size limit?
If you get the exception MaxUploadSizeExceed then here's a good article: www.baeldung.com/spring-maxuploadsizeexceeded
It's not a maxUploadSizeExceeded exception...
It is truncating characters after 32kb..Its basically a problem with the jcraft jar which spring uses internally.. ChannelSftp.put... after the sessiontimeout of 30s u get an IOException Stream Closed..
Not sure how to resolve this..
Thank you! Do I need to use the same process to use spring-integration-ftp?
Hi Solai. When I have time I will show an example with spring integration sftp and the annotation like @Gateway and @MessagingGateway. :-) Thank you for watching.
Will this work to connect to IBM mainframe server ?
Does the MF support SFTP?
Thanks for good example :)
You are welcome. Thank you for watching my video. :)
Great video. Thanks!
Glad you liked it! Thanks for commenting:)
Thanks!
You are welcome
thank you
Happy to help :)