Thread View: borland.public.cppbuilder.internet.socket
3 messages
3 total messages
Started by Carl Danley
Wed, 24 Jan 2007 21:01
Help with FTP Component using Indy 9 with BCB 2006!
Author: Carl Danley
Date: Wed, 24 Jan 2007 21:01
Date: Wed, 24 Jan 2007 21:01
12 lines
1570 bytes
1570 bytes
I need some help with some scripting in reference to uploading a file with the TIdFTP component... I am not sure as to how to upload the file programmatically... I dont know how to use a file stream and I need help with this topic... I remember in BCB 4.0 that there was a Upload function that was something like: "FTP->Upload(<File Location> , <File Name>);" Could someone possibly write a sample piece of code to upload a file that a user selected from an OpenDialog component??? It would be much appreciated! For your info, I am using the latest version of Borland Developer Studio 2006 and I am using Borland C++ Builder 2006 with Indy 9 to program... Thank you, Carl
Re: Help with FTP Component using Indy 9 with BCB 2006!
Author: Carl Danley
Date: Wed, 24 Jan 2007 21:31
Date: Wed, 24 Jan 2007 21:31
20 lines
1955 bytes
1955 bytes
Nevermind, I have figured it out... Apparently you just use the "Put()" function... It was very easy, I just overlooked the functions.... Example - TIdFTP1->Put(<local file>, ExtractFileName(OpenDialog1->FileName)); "Carl Danley" <cdanley@codebyter.com> wrote in message news:45b7c917@newsgroups.borland.com... >I need some help with some scripting in reference to uploading a file with >the TIdFTP component... I am not sure as to how to upload the file >programmatically... I dont know how to use a file stream and I need help >with this topic... I remember in BCB 4.0 that there was a Upload function >that was something like: "FTP->Upload(<File Location> , <File Name>);" >Could someone possibly write a sample piece of code to upload a file that a >user selected from an OpenDialog component??? It would be much appreciated! >For your info, I am using the latest version of Borland Developer Studio >2006 and I am using Borland C++ Builder 2006 with Indy 9 to program... > > Thank you, > Carl >
Re: Help with FTP Component using Indy 9 with BCB 2006!
Author: Remy Lebeau (TeamB)
Date: Wed, 24 Jan 2007 21:32
Date: Wed, 24 Jan 2007 21:32
35 lines
2133 bytes
2133 bytes
"Carl Danley" <cdanley@codebyter.com> wrote in message
news:45b7c917@newsgroups.borland.com...
> I am not sure as to how to upload the file programmatically...
Did you read the Indy documentation yet? Di you look at the Indy
demos?
> I dont know how to use a file stream
What exactly don't you know?
> I remember in BCB 4.0 that there was a Upload function that was
> something like: "FTP->Upload(<File Location> , <File Name>);"
Since Indy did not ship with BCB 4, you are likely referring to the
Upload() method of the Netmasters TNMFTP component, which has nothing
to do with Indy.
In Indy, the method is called Put(), and there are two overloaded
versions of it:
void __fastcall Put(const TStream *ASource, const AnsiString
ADestFile = "", const bool AAppend = false);
void __fastcall Put(const AnsiString ASourceFile, const AnsiString
ADestFile = "", const bool AAppend= false);
> Could someone possibly write a sample piece of code to upload a
> file that a user selected from an OpenDialog component???
Look at the demos on Indy's website.
Gambit
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads