Skip to content

Function: serializeGroupUrl() ​

ts
function serializeGroupUrl(input): string;

Defined in: serialize.ts:89

Builds a group root url, a group element url when nth is given, or the group's archive url when archive is — the write-side counterpart of parseGroupUrl, parseGroupElementUrl and parseArchiveUrl.

One function rather than two because both come from a single GroupUrlInput: a group root is the same url without an element index. Group roots address the whole group, so operations and filename apply only with nth.

Parameters ​

ParameterType
inputGroupUrlInput

Returns ​

string

See ​

https://uploadcare.com/docs/file-groups/

Example ​

ts
serializeGroupUrl({ cdnBase: 'https://ucarecdn.com', group: { uuid, count: 3 } })
// → https://ucarecdn.com/:uuid~3/