Skip to content

Function: documentPath() ​

ts
function documentPath(uuid, operations?): string;

Defined in: document/document-path.ts:17

Builds the domain-less conversion path /:uuid/document/-/.../ to submit to the REST API (POST /convert/document/). Not a URL — no domain involved.

Parameters ​

ParameterTypeDefault value
uuidstringundefined
operations?readonly CdnOperation[][]

Returns ​

string

Throws ​

TypeError on malformed uuids (development bundle only).

See ​

https://uploadcare.com/docs/transformations/document-conversion/

Example ​

ts
documentPath(uuid, [format('jpg'), page(2)])
// → /:uuid/document/-/format/jpg/-/page/2/