🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: Indy ftp server

#3967
From: Remy Lebeau (TeamB)
Date: Tue, 10 May 2005 16:46
32 lines
1905 bytes
"Jonny" <jonny.heyman@cekab.se> wrote in message
news:42806d24$1@newsgroups.borland.com...

> Having syntax problem with the code:

What EXACTLY are you having a problem with?  Please be more specific.

> What should it look like to handle upload request ie. put from a ftp
client?

You are supposed to be creating a suitable TStream object, such as a
TFileStream, to handle the file storage.  For example:

    void __fastcall TfrmMAIN::IdFTPServerStoreFile(TIdFTPServerThread
*ASender, const AnsiString AFileName, bool AAppend, TStream *&VStream)
    {
        // translate AFileName from an FTP-relative path
        // into a local HD path as needed, then...
        AnsiString LocalFileName = "...";

        Word Flags;
        if( (AAppend) && FileExists(LocalFileName) )
            Flags = (fmOpenReadWrite | fmShareDenyWrite);
        else
            Flags = fmCreate;

        VStream = new TFileStream(LocalFileName, Flags);
    }


Gambit
Technical Details
Message-ID: <4280e538$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail
References: <42806d24$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 11508e,80127a04bc5df55
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: <42806d24$1@newsgroups.borland.com>
Subject: Re: Indy ftp server
Date: Tue, 10 May 2005 09:46:32 -0700
Lines: 34
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: 68.69.17.41
Message-ID: <4280e538$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1115743544 68.69.17.41 (10 May 2005 09:45:44 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!news2.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail