EldoS | Feel safer!

Software components for data protection, secure storage and transfer

TElSimpleFTPSServer capture file info when transfer is complete

Posted: 12/18/2013 09:40:37
by Sean Taylor (Priority Standard support level)
Joined: 12/18/2013
Posts: 11

I need to capture the context of the connection and file transfer on each connection and retrieve the connection username and password as well as the file name that was uploaded.

I am using TElSimpleFTPSServer.

Is there a way to capture this information in the OnTransferCompleted method?
Posted: 12/19/2013 01:53:56
by Vsevolod Ievgiienko (Team)

Thank you for contacting us.

Its not possible via OnTransferCompleted method. Each connection is server by separate instance of TElFTPSServer that has needed events. You can access this object from TElSimpleFTPSServer.OnNewConnection event handler using next code:

TElFTPSServer s = Session.FTPSServer;

Then you can handle TElFTPSServer.OnUsernameReceived/OnFileStoreRequest events to capture information that you need.
Posted: 12/19/2013 13:28:11
by Sean Taylor (Priority Standard support level)
Joined: 12/18/2013
Posts: 11

Vsevolod ,

The problem with using OnNewConnection is that I do not know when the file being uploaded is complete to act upon it. My task is to retrieve the file name and connection credentials of the connecting user and process the file once it has been uploaded. Is this possible with the OnNewConnection event handler?

Posted: 12/20/2013 01:30:41
by Vsevolod Ievgiienko (Team)

The above mentioned method will do the job, but you should also use TElFTPSServer.OnTransferCompleted event.



Topic viewed 680 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!