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

Namespace: Dynamsoft.DotNet.TWAIN
Assembly: DynamicDotNetTWAIN (in DynamicDotNetTWAIN.dll) Version: 3.0.0.0 (3.0.0.0)

Syntax

C#
public bool HTTPUploadThroughPut(
	string strHTTPServer,
	short sImageIndex,
	string strHTTPRemoteFile
)
Visual Basic
Public Function HTTPUploadThroughPut ( _
	strHTTPServer As String, _
	sImageIndex As Short, _
	strHTTPRemoteFile As String _
) As Boolean

Parameters

strHTTPServer
Type: System..::..String
The name of the HTTP server.It should be only the name of the HTTP server, without "http://" or "https://".Port number is not needed here.
sImageIndex
Type: System..::..Int16
Specifies the index of image in buffer. The index is 0-based.
strHTTPRemoteFile
Type: System..::..String
The name of the image to be created on the HTTP server. It should a relative path on the web server.

Return Value

True indicates success. False indicates failure.

Remarks

Dynamic .NET TWAIN processes the image format according to the extension of the HTTPRemoteFile. Dynamic .NET TWAIN supports the following types of image files: Bitmap *.bmp, *.dib JPEG *.JPG, *.JPEG, .*.JPE, *.JFIF TIFF *.TIF, *.TIFF PNG *.PNG PDF *.PDF StrHTTPRemoteFile parameter should include the HTTP directory of the file. Write permission of the specified directory is needed for uploading. When the uploaded file is in TIFF format, if the value of IfTiffMultiPage is true, and there's a TIFF file with the same name on the server, the newly uploaded images will be added into the existing file. If the value of IfTiffMultiPage is false, the old file will be replaced. If the uploaded file is in another format, and there's a file with the same name on the server, the newly uploaded file will replace the old one.

Exceptions

ExceptionCondition
Dynamsoft.DotNet.TWAIN..::..TwainException When an error occurs and IfThrowException property is true, an exception will be thrown. When IfThrowException property is false, please check ErrorCode and ErrorString.

See Also