Solved

Uploading with Indy

Posted on 2012-04-02
2
556 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

A lot of questions regard threads in Delphi.   One of the more specific questions is how to show progress of the thread.   Updating a progressbar from inside a thread is a mistake. A solution to this would be to send a synchronized message to the…
Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
There's a multitude of different network monitoring solutions out there, and you're probably wondering what makes NetCrunch so special. It's completely agentless, but does let you create an agent, if you desire. It offers powerful scalability …
This tutorial will teach you the special effect of super speed similar to the fictional character Wally West aka "The Flash" After Shake : http://www.videocopilot.net/presets/after_shake/ All lightning effects with instructions : http://www.mediaf…
Suggested Courses
Course of the Month4 days, 9 hours left to enroll

635 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