The files collection is a container of files. The purpose of this page is to describe the JSON format and properties of each “file”.
A typical file object:
{
"name": "myfile.xliff",
"ext": ".xliff",
"translate": false,
"parserId": null,
"domain": null,
"parsers": null,
"pageCount": 2,
"sizeKB": 14,
"comments": "no comments",
"ok": true,
"error": null,
"errorLink": null
}
PROPERTIES
The properties are:
|
name |
A unique file name with extension. The name cannot contain folders. |
string |
|
ext |
The file extension. |
string |
|
translate |
Boolean. Indicates if the file requires translation or not. Used in specific contexts only such as when adding files to a project or submitting files with an order form. |
boolean |
|
parserId |
If a file needs translation then this property indicates the file filter that will be used, if any. |
integer? |
|
domain |
If a file needs translation then this property indicates the type of file as it was identified by the system. This may be “MSWORD” or “XLIFF” or “HTML”. See settings/documentformats to get a complete list. |
string? |
|
parsers |
In certain contexts, this array enumerates all available file filters to choose from. This is used with Wordbee Translator when a user uploads a file and is then given the choice on how the file shall be processed. Please contact Wordbee for more information. |
object[] |
|
pageCount |
Optional page count. Note: Property is not set by the system but by calling the properties-API. |
integer? |
|
sizeKB |
The size of the file in KiB. |
integer |
|
comments |
Optional comments. Note: Property is not set by the system but by calling the properties-API. |
string? |
Certain API methods may add additional properties. This is, for example, the case when uploading files.
|
ok |
Indicates if a newly uploaded file is valid. If false then the file is not valid - check error for the reason.
|
boolean |
|
error |
If ok is false then this property contains the reason for error. |
string? |
|
errorLink |
In some cases this property contains a hyperlink to more information about the precise error. |
string? |