 |
BorlandTalk.com Borland discussion newsgroups
|
| View previous topic :: View next topic |
| Author |
Message |
Ronnie Guest
|
Posted: Tue Apr 26, 2005 9:31 am Post subject: file upload over indy ftp client |
|
|
Hello
I have indy 8 and i'm trying to upload file but i get exeption...
"EIdProtocolReplyError with message 220 you will be disconnected after 15min
of inactivity"
the code is here:
void __fastcall TForm1::myFTPConnected(TObject *Sender)
{
Edit1->Text = "connected";
//myFTP->Put("c:\avatar.jpg", "avatar.jpg", false);
myFTP->MakeDir("test");
myFTP->Disconnect();
}
|
|
| Back to top |
|
 |
Remy Lebeau (TeamB) Guest
|
Posted: Tue Apr 26, 2005 4:59 pm Post subject: Re: file upload over indy ftp client |
|
|
"Ronnie" <ron_ron (AT) hotmail (DOT) com> wrote
That is a very old version that is no longer supported. Please upgrade to
the latest snapshot version of Indy 9 or 10.
Gambit
|
|
| Back to top |
|
 |
Ronnie Guest
|
Posted: Tue Apr 26, 2005 8:24 pm Post subject: Re: file upload over indy ftp client |
|
|
Huuhh... This drives me insane... Upgrading is too complicated to me..
But is there any other easyer ways to upload a file into a ftp server?
Ron.
|
|
| Back to top |
|
 |
Bob Gonder Guest
|
Posted: Wed Apr 27, 2005 2:52 pm Post subject: Re: file upload over indy ftp client |
|
|
Ronnie wrote:
| Quote: | Huuhh... This drives me insane... Upgrading is too complicated to me..
But is there any other easyer ways to upload a file into a ftp server?
|
The Win32 API is pretty easy:
hInternetSession = InternetOpen(
__argv[0],
INTERNET_OPEN_TYPE_PRECONFIG,
NULL, NULL, 0);
hFTPSession = InternetConnect( hInternetSession,
"ftp.yourisp.com",
INTERNET_INVALID_PORT_NUMBER,
username, userpassword,
INTERNET_SERVICE_FTP, 0, (DWORD)0);
FtpPutFile( hFTPSession,
from, to, FTP_TRANSFER_TYPE_BINARY, 0);
InternetCloseHandle( hFTPSession );
InternetCloseHandle( hInternetSession );
You can also use other Ftp functions such as
FtpGetCurrentDirectory
FtpFindFirstFile
FtpGetFile
And others.
|
|
| Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|