Cloudinary-flavoured client-side URL signing.
Wire-format-compatible with Image.Plug.Provider.Cloudinary.Signing
on the server side and with Cloudinary's hosted signed URLs.
Sign-only — verification happens at the back-end.
SHA-256 over <transforms>/<source><api-secret>. Signature is
inserted as a path segment s--<base64url-truncated-32>--
between the delivery type (upload) and the first transform
stage.
Summary
Functions
Signs a Cloudinary path with the first key in keys.
Functions
Signs a Cloudinary path with the first key in keys.
Arguments
pathis the path of a Cloudinary URL without ans--<sig>--segment.keysis a non-empty list of API secrets.
Options
:expires_at— currently unused. Cloudinary's signed-URL flow relies on path-bound signatures rather than a per-URL expiry parameter; key rotation handles long-term revocation.
Returns
- The path with
s--<sig>--/inserted between the delivery type and the transforms.
Examples
iex> Image.Components.Signing.Cloudinary.sign(
...> "/demo/image/upload/w_200/cat.jpg",
...> ["api_secret"]
...> )
...> |> String.contains?("/s--")
true