watson.document_conversion({version: 'v1', ...});
Parameters:
| Name |
Type |
Description |
options |
|
|
- Source:
Methods
convert()
One-off convert an attached document OR convert a previously uploaded document by ID
To convert a previously uploaded document, set params.document_id
Parameters:
| Name |
Type |
Attributes |
Description |
params.conversion_target |
Object
|
|
Must be set to one of ['ANSWER_UNITS', 'NORMALIZED_HTML', 'NORMALIZED_TEXT'] |
params.file |
ReadableStream
|
<optional>
|
The document file to convert. |
- Source:
convert(params, callback)
One-off convert an attached document OR convert a previously uploaded document by ID
To convert a previously uploaded document, set params.document_id
Parameters:
| Name |
Type |
Description |
params |
Object
|
Properties
| Name |
Type |
Attributes |
Description |
conversion_target |
Object
|
|
Must be set to one of ['ANSWER_UNITS', 'NORMALIZED_HTML', 'NORMALIZED_TEXT'] |
file |
ReadableStream
|
<optional>
|
The document file to convert. |
content_type |
String
|
<optional>
|
Overrides the default content-type determined from the file name. |
|
callback |
function
|
|
- Source: