watson.document_conversion({version: 'v1', ...});
Parameters:
| Name |
Type |
Description |
options |
|
|
- Source:
Methods
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. May be a ReadableStream or Buffer |
content_type |
String
|
<optional>
|
Set this when the content type cannot be determined from the filename (params.file.path) |
|
callback |
function
|
|
- Source: