🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.cppbuilder.internet.socket
Article #1459

Re: Help with FTP Component using Indy 9 with BCB 2006!

#1459
From: Remy Lebeau (TeamB)
Date: Wed, 24 Jan 2007 21:32
35 lines
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
Technical Details
Message-ID: <45b7d06f$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.albasani.net!feeder06.uucp-net.de!reader.uucp.at!feeder02.uucp.at!feeder08.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail
References: <45b7c917@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,42874b3acbbae875
X-Google-Attributes: gid11508e,public
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Remy Lebeau \(TeamB\)" <no.spam@no.spam.com>
Newsgroups: borland.public.cppbuilder.internet.socket
References: <45b7c917@newsgroups.borland.com>
Subject: Re: Help with FTP Component using Indy 9 with BCB 2006!
Date: Wed, 24 Jan 2007 13:32:51 -0800
Lines: 37
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1409
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409
NNTP-Posting-Host: 75.83.34.171
Message-ID: <45b7d06f$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1169674351 75.83.34.171 (24 Jan 2007 13:32:31 -0800)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!news3.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!t-online.de!newsfeed.freenet.de!news.albasani.net!feeder06.uucp-net.de!reader.uucp.at!feeder02.uucp.at!feeder08.uucp.at!news.uucp.at!newsgroups.borland.com!not-for-mail