FileContainer Object (Web Services API)
This object transfers input files and the results of processing these files between the client and the server.
This object can be used in two modes:
- Typically, to send an input file and receive a processing result, only the FileName and FileContents fields are used. The LocationPath field is not used.
- If the client and the server are located on the same computer or have access to the same network shares, instead of using the FileContents field to send a file, you can specify the full path to the file in the LocationPath field (the server must have read access to this path). Likewise, to get an XmlResult, you can specify the path to the shared directory where the output files will be placed (the server must have write access to this directory). The FileContents fields of the child objects will be empty; instead, the full paths to the output files will be specified in LocationPath fields.
The full path to the output directory is specified as follows:
- For the ProcessFile method, the full path to the output directory cannot be specified. Only input files can be passed using LocationPath.
- For the ProcessTicket method, the path is specified in XmlTicket.ExportParams.ResultLocationPath.
- For the StartProcessFile or StartProcessTicket method, the path is specified in the resultLocation parameter of the GetJobResult and GetJobResultEx methods.
Note. This mode is disabled by default because it may introduce a security vulnerability unless proper access control is used for the application pool identity account.
To enable this mode, use the fineReaderServerWebService.directFileAccess option in the Web.config file. The default location for this file is INSTALLDIR\FineReaderServerWS.
Properties
Name | Type | Description |
FileContents | Byte Array | Stores the file contents. |
FileName | String |
Stores the file name and extension. Note. If the FileName property is left unspecified, unique GUID identifiers will be used for output file names. |
OpenPassword* | String | Stores the password for accessing the password-protected PDF file. |
OwnerPassword* | String | Stores the owner password. Opening the document with the correct owner password (assuming it is not the same as the user password) allows full (owner) access to the document. This unlimited access includes the ability to change the document’s passwords and access permissions. |
LocationPath* | String | Stores the UNC path to the file. The path must be available from the computer where OCRServerClient is installed. If you set this property, the FileContents value must be empty. |
* Optional parameter.
Important! For the correct processing of Office documents (i.e. DOC, DOCX, XLS, XLSX, PPT, PPTX, etc. files) you must use the FileName property and specify the file name and extension. Otherwise the processing job will fail and the following error message will be issued: “The image file format has not been recognized.”
Input parameter
The FileContainer object is the input parameter of the WebService::ProcessFile method.
See also
26.03.2024 13:49:49