DonationCoder.com forum
 
Read-only archive. This is a static copy of the DonationCoder.com forum. Reading and searching work as before; logging in, posting and private messages do not.
Archive of 2026-10-21 · About this archive · Main site

Author Topic: Writing Files to an FTP with a Buffer using BCB 2006...  (Read 6,257 times)

Renox

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 58
Writing Files to an FTP with a Buffer using BCB 2006...
« on: January 24, 2007, 03:10 AM »
Is it possible for anyone to explain to me how to upload a file to an FTP site using BCB 2006... Apparently, there is no TIdFTP->Upload() function that allows you to do everything automated... At least, I don't know of one... You have to open IO streams and such and I dont know the proper edicate for that... If anyone could fill me in on the "how-to's" that would be great!

Renox

  • Honorary Member
  • Joined in 2006
  • **
  • Posts: 58
Re: Writing Files to an FTP with a Buffer using BCB 2006...
« Reply #1 on: January 25, 2007, 01:28 AM »
lol... I figured this one out as well... And I feel pretty stupid for it too... The fact that I wasted a post for something so simple became an annoyance as soon as I figured out that the "Put()" function served as the "Upload()" function back in BCB 4.0.... Oh well!

Example of what I was trying to do:
Code
TIdFTP1->Connect();
TIdFTP1->ChangeDir("/Uploads");
TIdFTP1->Put(OpenDialog1->FileName, ExtractFileName(OpenDialog1->FileName));
// ^ Uploads a file that the user has selected from the OpenDialog that was executed previously...
« Last Edit: January 25, 2007, 01:30 AM by Renox »

mouser

  • First Author
  • Administrator
  • Joined in 2005
  • *****
  • Posts: 40,931
    • Gathering Badge
    • Plugin Coding Medal
    • Participated in NANY Challenge Seventeen Times
    • Cody Award
    • Coding Snacks
    • Volunteers/Staff
Re: Writing Files to an FTP with a Buffer using BCB 2006...
« Reply #2 on: January 27, 2007, 06:38 PM »
all's well that ends well.  What are you making? It seems fun.

Original address: https://www.donationcoder.com/forum/index.php?topic=7148.0