Description
Returns or sets whether SSL is used when uploading or downloading images.
Data type
<short>
Default value
false
Syntax
.IfSSL = ...;
Remarks
The default value is 'false'. This property is typically used with HTTPPort
. If IfSSL is set to 'true', make sure HTTPPort is set to a secure port like 443.
When an error occurs, check ErrorCode
or ErrorString
for error information.
See also
Example
function btnUpload_onclick() { if (window.location.protocol != "https:") { DWObject.HTTPPort = 80; DWObject.IfSSL = false; // if 80 is the port number of non-secure port } else { DWObject.HTTPPort = 443; DWObject.IfSSL = true; // if 443 is the port number of secure port } DWObject.HTTPUploadThroughPost("127.0.0.1", 0, "/SaveToFile.php", "imageData.jpg"); if (DWObject.ErrorCode != 0) alert(DWObject.ErrorString); else //succeded alert("Successful"); }