BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

file upload over indy ftp client

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Internet Socket)
View previous topic :: View next topic  
Author Message
Ronnie
Guest





PostPosted: Tue Apr 26, 2005 9:31 am    Post subject: file upload over indy ftp client Reply with quote



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





PostPosted: Tue Apr 26, 2005 4:59 pm    Post subject: Re: file upload over indy ftp client Reply with quote




"Ronnie" <ron_ron (AT) hotmail (DOT) com> wrote


Quote:
I have indy 8

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





PostPosted: Tue Apr 26, 2005 8:24 pm    Post subject: Re: file upload over indy ftp client Reply with 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?

Ron.


Back to top
Bob Gonder
Guest





PostPosted: Wed Apr 27, 2005 2:52 pm    Post subject: Re: file upload over indy ftp client Reply with quote

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
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder (Internet Socket) All times are GMT
Page 1 of 1

 
Jump to:  
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


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.