a large Delphi application needs to upload a file to a server.
The server is behind a router that won't allow FTP.
SSH (SFTP ?) is allowed, instead (Tunnelier works all right).
The coder will provide code that we can trasplant into our application and call with the following i/f.
function [login to view URL](FileName:string):boolean;
begin
with [login to view URL](self) do
try
HostName_ :=ReadIniString(CurShp,'UpdateCST_HostDir', '');
UserName_ :=ReadIniString(CurShp,'UpdateCST_HostDir', '');
PassWord_ :=ReadIniString(CurShp,'UpdateCST_HostDir', '');
Title_:='export dati';
HostDir_ :=ReadIniString(CurShp,'REPL2_HostDir', '');
HostFile_ :=ReadIniString(CurShp,'REPL2_HostFile', '');
LocalFile_ :=FileName;
DebugMode_ :=ReadIniInteger(CurShp,'REPL2_DebugMode', 1)=1;
PassiveMode_ :=ReadIniInteger(CurShp,'REPL2_PassiveMode', 1)=1;
LogFile_ :=AddColDefsPath('[login to view URL]');
FTPAction_:=acSetFile;
Mode:=upRemote;
result:=LoadFile(FileName);
if result then
me_mess(ok);
finally
Free;
end;
end;
## Deliverables
you will test the code in your server (as you won't have access to our server). The coder will provide a test application. The provided component that uploads the file will write a log file for debugging purposes.