Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
function updateLargeViewer() {
const DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer');
const DWObjectLargeViewer = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainerLargeViewer');
if (DWObject) {
DWObject.CopyToClipboard(DWObject.CurrentImageIndexInBuffer); // Copy the current image in the thumbnail to clipboard in DIB format.
DWObjectLargeViewer.LoadDibFromClipboard(); // Load the image from Clipboard into the large viewer.
}
}
function uploadImage() {
const DWObject = Dynamsoft.WebTwainEnv.GetWebTwain('dwtcontrolContainer');
if (DWObject) {
DWObject.HTTPPort = 80;
DWObject.IfSSL = false;
DWObject.HTTPUploadThroughPost("www.dynamsoft.com", DWObject.CurrentImageIndexInBuffer, "upload", "tmp.jpg", () => {}, (errorCode: number, errorString: string) => {});
}
}