This method uploads data in a byte array to a file on the remote server specified by a URI.

[Visual Basic] Public Function UploadByteArrayToFile(ByVal remoteAddress As System.Uri, ByVal data As Byte()) As Boolean
[C#] public bool UploadByteArrayToFile(System.Uri remoteAddress, byte[] data);

Parameters

remoteAddress

The upload Uri

data

The data in byte array

Return Value

Returns True if successful, otherwise returns False

Explanation

The UploadByteArrayToFile method uploads data in a byte array to a file on the remote server specified by a URI.

The method is enabled for FTP protocol.

Example

[Visual Basic.NET]

Dim _ftp As New Newtone.ImageKit.WPF.Ftp
Dim Ret As Boolean
'Username and password
_ftp.Credentials = New NetworkCredential("user", "password")
'Passive mode
_ftp.Passive = True
Ret = _ftp.UploadByteArrayToFile(New Uri("ftp://www.newtone.co.jp/test/test.jpg"), data)

[Visual C#.NET]

Ret = _ftp.UploadByteArrayToFile(New Uri("ftp://www.newtone.co.jp/test/test.jpg"), data)
bool Ret;
//Username and password
_ftp.Credentials = new NetworkCredential("user", "password");
//Passive mode
_ftp.Passive = true;
Ret = _ftp.UploadByteArrayToFile(new Uri("ftp://www.newtone.co.jp/test/test.jpg"), data);

See Also

Ftp Class | Ftp Members

 

The ImageKit WPF is created by Newtone Corporation