set_download hosts a file behind one stable link, so a new version never breaks the pages that link to it.
- New:
set_download({ name, filePath | mediaId + filename })(filePathis stdio only;mediaIdcomes fromupload_file, or a chat attachment, which is moved private). New version:downloadId+ a file (same link;label,notesfor the changelog). Roll back:downloadId+currentVersionId.list_downloadsshows the link, versions (the served one starred) and download counts;remove_downloadremoves it or one old version. Pro and up;.exe/.dmgand similar need Agency. accessmakes it members-only:{ members: true }for any plan,{ plans: ["pro"] }for those,{ members: false }public.- Link to it with the id the tool returns:
<a class="btn btn-primary" href="/api/downloads/<downloadId>" download>Get the guide</a>; a video plays from<video src="/api/downloads/<downloadId>?inline=1" controls></video>. For a plain public file (a PDF in an<a>, an<audio src>){{ '<mediaId>' | file_url }}is enough. - Track clicks with
data-track="ga4:guide_download"on the link. The delivery email is a site email (seeemails).