In order to enable more interactions with FTP servers, after having proposed the Waarp Gateway FTP, we now propose to integrate within the Waarp Gateway FTP and within the Waarp R66 the ability to use task (pre or post tasks) to send or receive a file through a FTP client (based on FTP4J). Note that the command will be synchronous.
For both Gateway FTP and R66, the argument will be as follow:
"-file filepath
-to requestedHost
-port port
-user user
-pwd pwd
[-account account]
[-mode active/passive]
[-ssl no/implicit/explicit]
[-cwd remotepath]
[-digest (crc,md5,sha1)]
[-pre extraCommand1 with ',' as separator of arguments]
-command command from (get,put,append)
[-post extraCommand2 with ',' as separator of arguments]"
The order of commands will be:
connection to requestHost on port (if ssl native => using native ssl link)
User user
PASS pwd
if account => ACCT account
if -ssl & auth => AUTH, PBSZ 0, PROT P
if passive => PASV
CWD remotepath; if error => MKD remotepath then CWD remotepath (and ignoring any error)
if pre => extraCommand1 with ',' replaced by ' ' (note: do not use standard commands from FTP like ACCT,PASS,REIN,USER,APPE,STOR,STOU,RETR,RMD,RNFR,RNTO,ABOR,CWD,CDUP,MODE,PASV,PORT,STRU,TYPE,MDTM,MLSD,MLST,SIZE,AUTH)
BINARY (binary format)
if get => RETR filepath.basename ; if put => STOR filepath ; if append => APPE filepath.basename
if digest & get/put/append & remote site compatible with XCRC,XMD5,XSHA1 => FEAT (parsing if found corresponding XCRC,XMD5,XSHA1) ; then XCRC/XMD5/XSHA1 filepath.basename ; then locally comparing this XCRC/XMD5/XSHA1 with the local file
if post => extraCommand2 with ',' replaced by ' ' (note: do not use standard commands from FTP like ACCT,PASS,REIN,USER,APPE,STOR,STOU,RETR,RMD,RNFR,RNTO,ABOR,CWD,CDUP,MODE,PASV,PORT,STRU,TYPE,MDTM,MLSD,MLST,SIZE,AUTH)
-
QUIT