Page 1 of 1

FTP delete

Posted: Thu Aug 23, 2018 10:35 am
by Saman Sjr.
this code run on desktop but return "not implemented" error on android

Code: Select all

put "ftp://username:password@my.ftp.server/filename.jpg" into FTPfile2Del
delete URL FTPfile2Del
the dictionary said delete URL can run on android,
what is the problem ?

Re: FTP delete

Posted: Thu Aug 23, 2018 11:04 am
by FourthWorld
Unless this app is just for your personal use, FTP is not the right tool for that job.

Have you considered HTTP?

Re: FTP delete

Posted: Thu Aug 23, 2018 12:10 pm
by bangkok
What about tsNetSendCmd or tsNetSendCmdSync ? (tsNet library with Indy Edition, it works on Android)

from the dictionary :

Code: Select all

local tResult, tCmds
put "CWD /upload_dir" into tCmds
put cr & "DELE backup.dat" after tCmds 
put tsNetSendCmd("1", "ftp://user:pass@ftp.example.com", tCmds,  "transferComplete") into tResult

Re: FTP delete

Posted: Thu Aug 23, 2018 2:19 pm
by Saman Sjr.
Thank you for both of you
I considering HTTP method at the moment

Re: FTP delete

Posted: Thu Aug 23, 2018 8:27 pm
by FourthWorld
As you explore that, be sure to focus on HTTPS, rather than HTTP. HTTPS is so common these days that's probably what you were already doing, but it's such an important difference, esp. for things that allow modification of client resources, that I figured it was better to err on the side of thoroughness here.