You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
forgejo/routers
JakobDev 42919ccb7c
Make Release Download URLs predictable (#23891)
As promised in #23817, I have this made a PR to make Release Download
URLs predictable. It currently follows the schema
`<repo>/releases/download/<tag>/<filename>`. this already works, but it
is nowhere shown in the UI or the API. The Problem is, that it is
currently possible to have multiple files with the same name (why do we
even allow this) for a release. I had written some Code to check, if a
Release has 2 or more files with the same Name. If yes, it uses the old
`attachments/<uuid>` URlL if no it uses the new fancy URL.

I had also changed `<repo>/releases/download/<tag>/<filename>` to
directly serve the File instead of redirecting, so people who who use
automatic update checker don't end up with the `attachments/<uuid>` URL.

Fixes #10919

---------

Co-authored-by: a1012112796 <1012112796@qq.com>
1 year ago
..
api Add actions support to package auth verification (#23729) 1 year ago
common Editor preview support for external renderers (#23333) 1 year ago
install Set `X-Gitea-Debug` header once (#23361) 1 year ago
private Refactor internal API for git commands, use meaningful messages instead of "Internal Server Error" (#23687) 1 year ago
utils Implement FSFE REUSE for golang files (#21840) 2 years ago
web Make Release Download URLs predictable (#23891) 1 year ago
init.go Refactor `setting.Database.UseXXX` to methods (#23354) 1 year ago