Solved

Uploading with Indy

Posted on 2012-04-02
2
550 Views
Last Modified: 2012-04-07
Using the Indy component, user logs on and creates directories on the server. These directories are named in a listbox.

I have a stringgrid:
Row 0: File Name.
Row 1: Path of this file on the user's computer.
Row 2: Path to the location where this file is to be uploaded.
Row 3: Transfer Mode (ASCII or Binary).
Row 4: Chmod value of this file.

Files are uploaded and chmoded according to the stringgrid.

I am using Delphi XE.  Your help is greatly appreciated.
0
Comment
Question by:rincewind666
2 Comments
 
LVL 19

Accepted Solution

by:
Thommy earned 500 total points
ID: 37798377
For your Indy FTP UpLoad you can use following unit, where upload is done in a thread:
FTP-Upload mit Indy als Thread

You can upload several files at a time by adding files to the upload list (procedure AddToFileList).
All files must be located in the same directory, which must be set by "SetSourceDir".
FTP configuration is loaded by "LoadConfig" out of an ini file. Adapt this procedure to load the configuration from your stringgrid.
Most of the time the thread is sleepinp. You wake it up with "StartUpload" and the transfer starts.
After a successful transfer the file list is deleted, status is set to ftpReady and the thread falls asleep again.
If the thread is sleeping and status is not ftpReady, then status shows the ftp action, which causes an error.
While uploading, "StartUpload" is blocked.

See below how you can add setting of chmod file permission to the above unit...
chmod (Setting File Permissions)
0
 

Author Closing Comment

by:rincewind666
ID: 37818565
Many thanks for your help.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

In this tutorial I will show you how to use the Windows Speech API in Delphi. I will only cover basic functions such as text to speech and controlling the speed of the speech. SAPI Installation First you need to install the SAPI type library, th…
Have you ever had your Delphi form/application just hanging while waiting for data to load? This is the article to read if you want to learn some things about adding threads for data loading in the background. First, I'll setup a general applica…
It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring. It works on many operating systems, in many languages.
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now