How to check FTP send successful in Flexy?

I use flexy 205 to send data from flexy to sever via ftp sever
need to know the putftp is success?what function i should use?
thanks for your help

Hello @duy27trong,

See the following example from our developer.ewon.biz page. After you call putFTP you can get the Action ID and check that the action has completed.

https://developer.ewon.biz/content/ftp

Deryck

thanks for you reply
PUTFTP “cc.csv”,“cc123”
success%= GETSYS Prg,“ACTIONSTAT”
Print success%
I do with this script .But in case lost connection can not slove ?

My project need send data very one min to sever and update time from to ,
and cover lost connection .
This is why i need check send data is ok ?
Can you give me example ?

Hello,

I do not think you have it correct. As the example shows after you perform your action you would need to run:
actionID% = GETSYS PRG, "ACTIONID"
This give you the actionID of FTP request

onEvent:
eventId% = GETSYS PRG, "EVTINFO"
IF (eventId% = actionID%) THEN
SETSYS PRG, "ACTIONID", eventId%
stat% = GETSYS PRG, "ACTIONSTAT"
IF (stat% = 0) THEN
//action taken on success

ELSE
//action for failure 
ENDIF
ENDIF
END