Parameters
Name | Explanation |
---|---|
RemoteFilePath | The name and path of the file to be retrieved |
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 HTTPGetFileEx method retrieves a file from the HTTP(S) server. This method can only be used after the HTTPConnect method has connected to the HTTP(S) 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.
The retrieved file is saved in the location specified by the FileName property.
Example Code:
Visual Basic
If ImageKit1.File.HTTPConnect("www.newtone.co.jp", "", 443, True,
"User", "Password") = False Then Exit Sub
ImageKit1.File.FileName = "C:\Images\001.jpg"
Call ImageKit1.File.HTTPGetFileEx("images/001.jpg", 10)
Call ImageKit1.File.HTTPDisconnect()
Visual C++
if (ImageKit1.GetFile().HTTPConnect("www.newtone.co.jp", "", 443,
TRUE, "User", "Password") == FALSE) return;
ImageKit1.GetFile().SetFileName("C:\\Images\\001.jpg");
ImageKit1.GetFile().HTTPGetFileEx("images/001.jpg", 10);
ImageKit1.GetFile().HTTPDisconnect();