TWAIN ActiveX/Plug-in Windows/Mac HTTP Control/SDK

HTTPUploadThroughPut Method

Description

Uploads the image of a specified index in buffer to the HTTP server through HTTP PUT method.

Support information

ActiveX Edition Plug-in Edition Mac Edition
Since V4.0 Since V4.0 Since V6.4

Syntax

Boolean ObjectName. HTTPUploadThroughPut(String HTTPServer, Short sImageIndex, String HTTPRemoteFile)

Parameters

String HTTPServer: the name of the HTTP server.

Short sImageIndex: specifies the index of image in buffer. The index is 0-based. 

String HTTPRemoteFile: the name of the image to be created on the HTTP server. It should a relative path on the web server.

Return value

Boolean.

TRUE indicates success. FALSE indicates failure.

When an error occurs and IfThrowException property is TRUE, an exception will be thrown.

When FALSE is returned or an exception is thrown, check ErrorCode property and ErrorString property for error information.

Remarks

Dynamic Web TWAIN processes the image format according to the extension of the HTTPRemoteFile.

Dynamic Web TWAIN supports the following types of image files:

Bitmap *.bmp, *.dib
JPEG *.JPG, *.JPEG, .*.JPE, *.JFIF
TIFF *.TIF, *.TIFF
PNG *.PNG
PDF *.PDF

HTTPRemoteFile parameter should include the HTTP directory of the file.

Write permission of the specified directory is needed for uploading.

See also

FTPUserName property, FTPPassword property, FTPPort property, ProxyServer property, FTPDownload(), FTPUpload(), HTTPPort property, IfSSL property, HTTPUserName property, HTTPPassword property, HTTPDownload(),, HTTPUploadThroughPost()

Sample

A JavaScript sample is provided.

...
<script language="javascript" type="text/javascript">

WebTWAIN = document.getElementById("iDynamicWebTwain");//iDynamicWebTwain is the id of the Dynamic Web TWAIN on the page (An object or an embed).

function btnScan_onclick() 
{
	WebTWAIN.DynamicWebTwain1.HTTPUploadThroughPut("localhost", 0, "/WebTWAIN/Images/ImageData.jpg");
}
</script>




TWAIN ActiveX | TWAIN Plug-in | TWAIN Control | TWAIN SDK | Scanner COM
Software Configuration Management | Version Control | Source Control
Copyright © 2012 Dynamsoft Corporation. All Rights Reserved.