This function transfers a file to the HTTP server or the HTTPS. (It includes connecting to and disconnecting from server.)
Parameters
Name | Explanation |
---|---|
ServerName | The name of the HTTP(S) server or IPAddress (*1) |
RemoteFile | The destination on the HTTP(S) server where the file is to be saved. Includes path and file name |
LocalFile | The filename and path of the local file to be transferred |
UserName | The username needed to access the HTTP(S) server |
Password | The password needed to access the HTTP(S) server |
TransPercent | The percent of file tranferred before the User Function is called |
UserProc | The address of the user function (If not using the user function then set to 0) |
Caption | Sets the text displayed in the title bar of the progress dialog box |
Message | Sets the message displayed in the progress dialog box |
Button | Sets the name of the button displayed in the progress dialog box |
Return Value
Returns True (nonzero) if successful. Returns False (0) if unsuccessful.
Explanation
The IKHTTPPutFile function transfers a file to the HTTP server or the HTTPS server. (It includes connecting to and disconnecting from server.) This method can only be executed from the client computer. It does not operate on the server. The TransPercent parameter sets the percent of file tranferred before the User Function is called.
If the user function is set or if the Caption, Message, and Button parameters are blank then the Progress dialog box is not displayed. If the Progress dialog box is displayed, it indicates the percentage of the current process completed. For more information about the user functions please refer to the Definition of User Function in the Ik9File.dll, Ik9FileA.dll, Ik9File64.dll, Ik9File64A.dll section.
(*1)
When setting a proxy server, changing the port number, or using HTTPS, use the ServerName parameter to pass the necessary information. The information is passed in this parameter in the following order: HTTP(S) Server name or IPAddress;Proxy Server IPAddress;Port Number;HTTPS. (use a string with a semicolon to delimit multiple entries).
Note: If you do not specify the port number the default port number will be used. If you do not specify HTTPS then HTTP will be used.
- A. Set a proxy server:
- ServerName = "www.newtone.co.jp;xxx.xxx.x.xxx"
- B. Change the port number to 81:
- ServerName = "www.newtone.co.jp;;81"
- C. Set a proxy server and change the port number to 81:
- ServerName = "www.newtone.co.jp;xxx.xxx.x.xxx;81"
- D. Use HTTPS:
- ServerName = "www.newtone.co.jp;;;HTTPS"
- E. Use HTTPS and change the port number to 444:
- ServerName = "www.newtone.co.jp;;444;HTTPS"