This method uploads data in a byte array to a file on the remote server specified by a URI.
[Visual Basic] Public Function
FtpUploadByteArrayToFile(ByVal remoteAddress As System.Uri, ByVal
data As Byte()) As Boolean
[C#] public bool
FtpUploadByteArrayToFile(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 FtpUploadByteArrayToFile 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 Ret As Boolean
'Username and password
ImageKit1.File.FtpCredentials = New NetworkCredential("user", "password")
'Passive mode
ImageKit1.File.FtpPassive = True
Ret = ImageKit1.File.FtpUploadByteArrayToFile(New Uri("ftp://www.newtone.co.jp/test/test.jpg"), 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(new Uri("ftp://www.newtone.co.jp/test/test.jpg"), data);
Dim Ret As Boolean
'Username and password
ImageKit1.File.FtpCredentials = New NetworkCredential("user", "password")
'Passive mode
ImageKit1.File.FtpPassive = True
Ret = ImageKit1.File.FtpUploadByteArrayToFile(New Uri("ftp://www.newtone.co.jp/test/test.jpg"), 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(new Uri("ftp://www.newtone.co.jp/test/test.jpg"), data);
See Also
ImageKit.File Members | Newtone.ImageKit.Wpf.ImageKit