This method transfers a file to the FTP server.

[Visual Basic]   [ Boolean = ]imagekitcontrolname.File.FTPPutFileEx(RemoteFilePath As String, TransPercent As Long)
[Visual C++]     [ BOOL = ]imagekitcontrolname.GetFile().FTPPutFileEx(LPCTSTR RemoteFilePath, long TransPercent)
[VB.NET]   [ Boolean = ]imagekitcontrolname.File.FTPPutFileEx(RemoteFilePath As String, TransPercent As Integer)
[C#.NET]   [ bool = ]imagekitcontrolname.File.FTPPutFileEx(string RemoteFilePath, int TransPercent)

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 (nonzero) if successful. Returns False (0) 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:

Visual Basic
If ImageKit1.File.FTPConnect("www.newtone.co.jp", "", 21, True, "User", "Password") = False Then Exit Sub
ImageKit1.File.FileName = "C:\Images\001.jpg"
Call ImageKit1.File.FTPPutFileEx("images/001.jpg", 10)
Call ImageKit1.File.FTPDisconnect()

Visual C++
if (ImageKit1.GetFile().FTPConnect("www.newtone.co.jp", "", 21, TRUE, "User", "Password") == FALSE) return;
ImageKit1.GetFile().SetFileName("C:\\Images\\001.jpg");
ImageKit1.GetFile().FTPPutFileEx("images/001.jpg", 10);
ImageKit1.GetFile().FTPDisconnect();

VB.NET
If ImageKit1.File.FTPConnect("www.newtone.co.jp", "", 21, True, "User", "Password") = False Then Exit Sub
ImageKit1.File.FileName = "C:\Images\001.jpg"
ImageKit1.File.FTPPutFileEx("images/001.jpg", 10)
ImageKit1.File.FTPDisconnect()

C#.NET
if(ImageKit1.File.FTPConnect("www.newtone.co.jp", "", 21, True, "User", "Password") = false) return;
ImageKit1.File.FileName = @"C:\Images\001.jpg"
ImageKit1.File.FTPPutFileEx("images/001.jpg", 10);
ImageKit1.File.FTPDisconnect();

 

The ImageKit10 ActiveX is a product created by Newtone Corporation