Skip to content

Function: serializeFileUrl() ​

ts
function serializeFileUrl(input): string;

Defined in: serialize.ts:65

Builds a url for a single stored file — the write-side counterpart of parseFileUrl.

Exists for the same reason the per-kind parsers do: a caller that only ever builds file urls should not carry the group and proxy branches. Import this instead of serializeCdnUrl and they tree-shake away.

Parameters ​

ParameterType
inputFileUrlInput

Returns ​

string

See ​

https://uploadcare.com/docs/delivery/cdn/

Example ​

ts
serializeFileUrl({ cdnBase: 'https://ucarecdn.com', uuid, operations: [preview(800, 600)] })
// → https://ucarecdn.com/:uuid/-/preview/800x600/