Download a submitted version's archived document
Stream the archived PDF of a submitted version.
There are no signed download URLs anywhere in this platform, so this is how the document is fetched: the request is authenticated and authorised like any other and the bytes are streamed through it. Authorisation is therefore checked when the file is fetched rather than when a link was minted, so a grant withdrawn after the document was generated stops the download.
Authorised exactly as reading the version is. The document contains what the version contains, so anybody who may read one may read the other, and there is no separate permission to hold.
Each fetch is recorded in the audit trail. Retention answers what was issued; the audit record answers who took it.
A version whose document is still generating, or whose generation failed, returns a conflict rather than an empty file. A version that never had one, which is anything submitted before archiving was switched on, returns a not found.
Served by a custom handler rather than a generated one, because it returns a file rather than a JSON:API document.