download token: make a token page

- token page helps communicating a single link to multiple assets
- provide an extra layer in case of "miss click"
- ui: just link the page, not every asset of each download token.
This commit is contained in:
Mikaël Cluseau
2025-07-22 11:43:41 +02:00
parent ab6f0b6358
commit d4087d3534
3 changed files with 54 additions and 10 deletions

View File

@ -37,6 +37,7 @@ func registerWS(rest *restful.Container) {
Route(ws.POST("/store.tar").To(wsStoreUpload).
Consumes(mime.TAR).
Doc("Upload an existing store")).
Route(ws.GET("/downloads/{token}/").To(wsDownloadPage)).
Route(ws.GET("/downloads/{token}/{asset}").To(wsDownload).
Param(ws.PathParameter("token", "the download token")).
Param(ws.PathParameter("asset", "the requested asset")).