Upload a file
You can upload a file to a remote server using an HTTP multi-part POST request.
Method summary
cfclient.file.upload(fileName,url,successCallback, errorCallback,[options])
- returns - None
- params
- fileName – Absolute or relative path of a file name (including file name)
- url - The remote server URL
- successCallback - The function to be invoked upon success/completion
- errorCallback - The function to be invoked if there is a file transfer error
Options object
The following options are also supported:
-trustAllHosts - Defaults to false. If set to true, it accepts all the security certificates. This is useful because Android rejects self-signed certificates. It is not recommended to set this as true for production use.
Example
//A function to capture and uplaod an image to a remote server |