Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Uploading with Indy

Posted on 2012-04-02
2
Medium Priority
?
560 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 1000 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

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

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…
Creating an auto free TStringList The TStringList is a basic and frequently used object in Delphi. On many occasions, you may want to create a temporary list, process some items in the list and be done with the list. In such cases, you have to…
This course is ideal for IT System Administrators working with VMware vSphere and its associated products in their company infrastructure. This course teaches you how to install and maintain this virtualization technology to store data, prevent vuln…
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

972 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