WsUploadFile
Uploads a file to a web service.
Syntax
bool WsUploadFile (string url, string filename, string method, int timeout)
Parameters
- url
- Required: the URI of the resource to receive the file. Smart parameters are supported.
- filename
- Required: the file to send to the resource. Smart parameters are supported.
- method
- Optional: the file upload method. By default, 'POST' is used for http and 'STOR' for ftp.
- timeout
- Optional: the timeout value in milliseconds before abandoning the request. Smart parameters are supported.
Returns:
True, if the action succeeds. Otherwise, False.Level
All levels.Details
The timeout value specified for this operation will override any timeout value set elsewhere. The default timeout value is 60000 milliseconds, or one minute. If no method is specified, the default is "POST" for http and "STOR" for ftp.Example
WsUploadFile("http://server/service", "C:\Test\myfile.jpg", "", "120000")