This method uploads data in a byte array to a file on the remote server specified by a host name, path, and port number.

[Visual Basic] Public Function FtpUploadByteArrayToFile(ByVal remoteHost As String, ByVal remotePath As String, ByVal remotePort As Integer, ByVal data As Byte()) As Boolean
[C#] public bool FtpUploadByteArrayToFile(string remoteHost, string remotePath, int remotePort, byte[] data);

Parameters

remoteHost

DNS style domain name or IP Address

remotePath

Remote path to file on the server

remotePort

IP port number

data

Data in byte array

Return Value

Returns True if successful, otherwise returns False

Explanation

The FtpUploadByteArrayToFile method uploads data in a byte array to a file on the remote server specified by a host name, path, and port number.

This method is enabled for FTP protocol.

Example

[Visual Basic.NET]

Dim Ret As Boolean
'Username and password
ImageKit1.File.FtpCredentials = New NetworkCredential("user", "password")
'Passive mode
ImageKit1.File.FtpPassive = True
Ret = ImageKit1.File.FtpUploadByteArrayToFile("www.newtone.co.jp", "test/test.jpg", 21, data)

[Visual C#.NET]

bool Ret;
//Username and password
ImageKit1.File.FtpCredentials = new NetworkCredential("user", "password");
//Passive mode
ImageKit1.File.FtpPassive = true;
Ret = ImageKit1.File.FtpUploadByteArrayToFile("www.newtone.co.jp", "test/test.jpg", 21, data);

See Also

ImageKit.File Members | Newtone.ImageKit.Wpf.ImageKit

 

The ImageKit WPF is created by Newtone Corporation