Dynamic Web TWAIN  - TWAIN ActiveX/Plug-in, Scanner COM Control
TWAIN ActiveX/Plug-in HTTP Control/SDK

HTTPUploadThroughPutEx Method

Description

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

Syntax

Boolean ObjectName. HTTPUploadThroughPutEx(String HTTPServer, Short sImageIndex, String HTTPRemoteFile, Long ImageType)

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 file to be created on the HTTP server. It should a relative path on the web server.

Long ImageType: the image format of the file to be created on the HTTP 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 value of the ImageType.

Allowed Values ImageType
0 BMP
1 JPEG
2 TIFF
3 PNG
4 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, FTPDownloadEx(), HTTPPort property, HTTPUserName property, HTTPPassword property, HTTPDownloadEx(), HTTPUploadThroughPut(), HTTPUploadThroughPostEx()

Sample

A JavaScript sample is provided.

<script language="javascript">
	
	function btnHTTPUploadPut_onclick() {
		frmScan.DynamicWebTwain1.HTTPUploadThroughPut("localhost", 0, "/WebTWAIN/Images/ImageData.jpg", 1);
	}

</script>
 












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