Skip to content

Function: parseGroupElementUrl() ​

ts
function parseGroupElementUrl(url): ParsedGroupElementUrl;

Defined in: parse.ts:127

Parses a group element URL (/:uuid~N/nth/i/). Narrower than parseCdnUrl, and distinct from parseGroupUrl, which handles the group root.

Parameters ​

ParameterType
urlstring

Returns ​

ParsedGroupElementUrl

Throws ​

TypeError when the URL is not a group element.

See ​

https://uploadcare.com/docs/file-groups/#group-cdn

Example ​

ts
parseGroupElementUrl(`https://ucarecdn.com/${uuid}~3/nth/1/`)
// → { kind: 'group-element', nth: 1, group: { uuid, count: 3 }, ... }