[ https://issues.apache.org/jira/browse/SSHD-108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14330421#comment-14330421 ]
ASF GitHub Bot commented on SSHD-108: ------------------------------------- GitHub user davidje13 opened a pull request: https://github.com/apache/mina-sshd/pull/11 [SSHD-108] Implemented callback for successful file uploads Implements the behaviour I suggested here: https://issues.apache.org/jira/browse/SSHD-108?focusedCommentId=14330308&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-14330308 to allow successful uploads to be distinguished from aborted or failed uploads. This version is the non-API breaking version (optional interface), which seems to be better all-round. The majority of the new code is for the unit test, which required wrapping the file system factory, view and file to provide a custom stream for the test. The test org.apache.sshd.ServerTest.testServerIdleTimeoutWithForce(ServerTest.java:246) fails on my machine, but this is unrelated to the patch. You can merge this pull request into a Git repository by running: $ git pull https://github.com/davidje13/mina-sshd master Alternatively you can review and apply these changes as the patch at: https://github.com/apache/mina-sshd/pull/11.patch To close this pull request, make a commit to your master/trunk branch with (at least) the following in the commit message: This closes #11 ---- commit 495a9c86811051b06d2ae36e18c40db10152f0c6 Author: David Evans <davidj...@gmail.com> Date: 2015-02-21T20:12:45Z Added optional interface for file uploads which confirms completed uploads (to distinguish aborted/failed transfers) ---- > Add upload monitoring to sftp and scp > ------------------------------------- > > Key: SSHD-108 > URL: https://issues.apache.org/jira/browse/SSHD-108 > Project: MINA SSHD > Issue Type: Improvement > Affects Versions: 0.5.0 > Reporter: Richard Evans > Priority: Minor > > We have sshd integrated into our application and sftp is working fine. One > of the requirements is to initiate some action when a file upload it > complete. I have made this work by implementing handleClose in my SshFile > implementation and performing the action if createOutputStream had been > called previously. This seems a bit ugly though; it might be nicer if there > was some plug in mechanism to monitor file transfers. > Ideally the monitor would be able to distinguish between a successful upload > and a cancelled one (via ctrl-c at the client), but a quick perusal of the > sftp stuff seems to inidicate that this is not possible. -- This message was sent by Atlassian JIRA (v6.3.4#6332)