Thank you so much, Enrico, for your help.
I created a minimal function, but I can't provide you with a test FTP account. I'm staying with a friend who has an account at aruba.it.
Could my problem be due to security restrictions on the Aruba server? Or to the PC firewalls?
Every time I change the program's execution folder on my PC, uploading the file via FTP takes this interminable time.
The name of the file being uploaded is encrypted with the CharOdd() and CharEven() functions. Could this cause security issues when accessing it?
If you have any suggestions or modifications to the function, you're welcome. In the meantime, I'd better try to test it by removing the encryption and making some other changes.
UpLoadFile("File.txt", "ecc.it/users/")
FUNCTION UpLoadFile(cFile, cWhere)
LOCAL oInternet, oFtp, lUpLoad := .f.
oInternet := tInternet():New()
IF oInternet:hSession != 0
oFtp := tFtp():New("ftp.ecc.it", oInternet, cUser, cPass, 134217728)
IF oFtp:hFTP != 0
lUpLoad := FTPPutFile( oFtp:hFTP, cFile, cWhere + cFile, FTP_TRANSFER_TYPE_BINARY, 0 ) // PUNTO CRITICO CHE IMPIEGA MINUTI LA 1° VOLTA !
oFtp:End()
ENDIF
oInternet:End()
ENDIF
Return(lUpLoad)