This method transfers a file to the FTP server.

[C++Builder]   [ bool = ]imagekitcontrolname->FileIO->FTPPutFileEx(const UnicodeString RemoteFilePath, int TransPercent)
[Delphi]   [ Boolean = ]imagekitcontrolname.FileIO.FTPPutFileEx(const RemoteFilePath: string; TransPercent: Integer)

Parameters

Name Explanation
RemoteFilePath The destination on the FTP server where the file is to be saved. Includes path and file name
TransPercent The percentage of the file that is tranferred before the ImageKit Progress event is generated

Return Value

Returns True if successful. Returns False if unsuccessful.

Explanation

The FTPPutFileEx method transfers a file to the FTP server. The file transfered is the file specified by the FileName property.

This method can only be used after the FTPConnect method has connected to the FTP server. This method can only be executed from the client computer. It does not operate on the server. The TransPercent parameter sets the amount of transfer in percentage before the ImageKit Progress event fires. For example, if the TransPercent = 10, the ImageKit Progress event will fire 10 times, 1 time for each 10% of file transferred.

Example Code:

C++Builder
if (VImageKit1->FileIO->FTPConnect("www.newtone.co.jp", "", 21, true, "User", "Password") == false) return;
VImageKit1->FileIO->FileName = "C:\\Images\\001.jpg";
VImageKit1->FileIO->FTPPutFileEx("images/001.jpg", 10);
VImageKit1->FileIO->FTPDisconnect();

Delphi
if (VImageKit1.FileIO.FTPConnect('www.newtone.co.jp', '', 21, True, 'User', 'Password') = False) then Exit;
VImageKit1.FileIO.FileName := 'C:\Images\001.jpg';
VImageKit1.FileIO.FTPPutFileEx('images/001.jpg', 10);
VImageKit1.FileIO.FTPDisconnect();

 

The ImageKit10 VCL is a product created by Newtone Corporation