You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mina.apache.org by "Guillaume Nodet (JIRA)" <ji...@apache.org> on 2015/02/26 13:34:04 UTC

[jira] [Comment Edited] (SSHD-108) Add upload monitoring to sftp and scp

    [ https://issues.apache.org/jira/browse/SSHD-108?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14338325#comment-14338325 ] 

Guillaume Nodet edited comment on SSHD-108 at 2/26/15 12:33 PM:
----------------------------------------------------------------

I'm not really at ease with adding callbacks to detect end of uploads with an error code, if there's a poor heuristic to determine it.
I've done a bit of testing with Cyberduck for example, and afaik there's really now way to tell if an upload has been paused or is finished.

What could be doable is to add a sshd specific protocol extension so that the client could tell the user that an upload has been successfully completed.  But this kinda restricts to using sshd client ...  An alternative would be to use something like Apache Camel which has great support for moving files around.  Another alternative would be to provide the callback for each sftp request and let the user decide what he wants to do.
Any alternative would be fine for me, I'm kinda reluctant to tell the user an upload has been finished successfully, it that's only a best guess.


was (Author: gnt):
I'm not really at ease with adding callbacks to detect and of upload with an error code, if there's a poor heuristic to determine it.
I've done a bit of testing with Cyberduck for example, and afaik there's really now way to tell if an upload has been paused or is finished.

What could be doable is to add a sshd specific protocol extension so that the client could tell the user that an upload has been successfully completed.  But this kinda restricts to using sshd client ...  An alternative would be to use something like Apache Camel which has great support for moving files around.  Another alternative would be to provide the callback for each sftp request and let the user decide what he wants to do.
Any alternative would be fine for me, I'm kinda reluctant to tell the user an upload has been finished successfully, it that's only a best guess.

> 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)