Dynamic Web TWAIN: How to work with SSL?

You can use Dynamic Web TWAIN's IfSSL property.

The following JavaScript Sample shows how to use IfSSL property.

Code(Javascript):

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");
}

References:

IfSSL

HTTPUploadThroughPost