Centralized path helpers for the Catalogue module.
All paths go through PhoenixKit.Utils.Routes.path/1 for prefix/locale handling.
Summary
Functions
Signed URL under which the raw PDF binary is served. Resolves via
core's Storage.URLSigner — the host app already routes
/file/:file_uuid/:variant/:token through core's FileController.
Returns the PDF.js viewer URL with the file pre-bound and the
optional page fragment set. The viewer assets are vendored under
priv/static/pdfjs/ and served at /_pdfjs/ by the host
endpoint's Plug.Static mount.
Functions
@spec pdf_detail(Ecto.UUID.t()) :: String.t()
@spec pdf_detail(Ecto.UUID.t(), pos_integer()) :: String.t()
Signed URL under which the raw PDF binary is served. Resolves via
core's Storage.URLSigner — the host app already routes
/file/:file_uuid/:variant/:token through core's FileController.
@spec pdf_viewer(map(), pos_integer()) :: String.t()
Returns the PDF.js viewer URL with the file pre-bound and the
optional page fragment set. The viewer assets are vendored under
priv/static/pdfjs/ and served at /_pdfjs/ by the host
endpoint's Plug.Static mount.
The signed file URL is encoded via URI.encode_www_form/1 so
reserved characters in the underlying URL (?, &, =, #,
spaces) become percent-escaped query-param-safe bytes — URI.encode/1
alone does NOT escape those, which would corrupt the viewer's own
#page=N fragment if the file URL ever carries them.
@spec pdfs() :: String.t()