Skip to content

Function: nthUrl() ​

ts
function nthUrl(
   cdnBase, 
   group, 
   index, 
   operations?, 
   filename?
): string;

Defined in: group/group-urls.ts:30

Group element url /:uuid~N/nth/i/ with optional operations and filename (i is zero-based and validated against the group count).

Parameters ​

ParameterTypeDefault value
cdnBasestringundefined
groupGroupIdundefined
indexnumberundefined
operations?readonly CdnOperation[][]
filename?stringundefined

Returns ​

string

Throws ​

RangeError when the index is out of 0..count-1.

See ​

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

Example ​

ts
nthUrl('https://ucarecdn.com', { uuid, count: 3 }, 1) // → https://ucarecdn.com/:uuid~3/nth/1/