Uploads the image of a specified index in buffer to the FTP server as a specified image format.
Namespace: Dynamsoft.DotNet.TWAINAssembly: DynamicDotNetTWAIN (in DynamicDotNetTWAIN.dll) Version: 3.0.0.0 (3.0.0.0)
Syntax
| C# |
|---|
public bool FTPUploadEx( string strFTPServer, short sImageIndex, string strFTPRemoteFile, DWTImageFileFormat enumImageType ) |
| Visual Basic |
|---|
Public Function FTPUploadEx ( _ strFTPServer As String, _ sImageIndex As Short, _ strFTPRemoteFile As String, _ enumImageType As DWTImageFileFormat _ ) As Boolean |
Parameters
- strFTPServer
- Type: System..::..String
The name of the FTP server.
- sImageIndex
- Type: System..::..Int16
Specifies the index of image in buffer. The index is 0-based.
- strFTPRemoteFile
- Type: System..::..String
The name of the file to be created on the FTP server. It should be a relative path on the FTP server.
- enumImageType
- Type: Dynamsoft.DotNet.TWAIN.Enums..::..DWTImageFileFormat
The image format of the file to be created on the FTP server.
Return Value
True indicates success. False indicates failure.
Remarks
Dynamic .NET TWAIN processes the image format according to the value of the ImageType.
DWTImageFileFormat Allowed Values ImageType
0 BMP
1 JPEG
2 TIFF
3 PNG
4 PDF
FTPRemoteFile parameter should include the FTP directory of the file.
Write permission of the specified directory is needed for uploading.
Exceptions
| Exception | Condition |
|---|---|
| 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. |