This method uploads a file to an Http server specifying the remote URI and the local filename.
[Visual Basic] Public Function
HttpUploadFile(ByVal remoteAddress As System.Uri, ByVal
localFileName As String) As Boolean
[C#] public bool HttpUploadFile(System.Uri
remoteAddress, string localFileName);
Parameters
remoteAddress
The URI where the file is to be uploaded
localFileName
Local file name
Return Value
Returns True if successful. Returns False if unsuccessful.
Explanation
The HttpUploadFile method uploads a file to an Http server specifying the remote URI and the local filename.
This method is effective for the HTTP or HTTPS protocol.
Example
[Visual Basic.NET]
Dim Ret As Boolean
'Username and password
ImageKit.File.HttpCredentials = New NetworkCredential("user", "password")
'Uploads the file
Ret = ImageKit.File.HttpUploadFile(New Uri("http://www.newtone.co.jp/test/test.jpg"), "c:\test\test.jpg")
[Visual C#.NET]
bool Ret;
//Username and password
ImageKit.File.HttpCredentials = new NetworkCredential("user", "password");
//Uploads the file
Ret = ImageKit.File.HttpUploadFile(new Uri("http://www.newtone.co.jp/test/test.jpg"), @"c:\test\test.jpg");