aboutsummaryrefslogtreecommitdiffstats
path: root/modules/options/dynamic.go
diff options
context:
space:
mode:
authorJakobDev <jakobdev@gmx.de>2023-04-12 11:05:23 +0200
committerGitHub <noreply@github.com>2023-04-12 17:05:23 +0800
commit42919ccb7cd32ab67d0878baf2bac6cd007899a8 (patch)
treec19e1642825540098f7665a3c474aee0b163eac9 /modules/options/dynamic.go
parente03e827dcb27a4cd34dd4f9da96ec8d15aaa5c5a (diff)
downloadgitea-42919ccb7cd32ab67d0878baf2bac6cd007899a8.tar.gz
gitea-42919ccb7cd32ab67d0878baf2bac6cd007899a8.zip
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>
Diffstat (limited to 'modules/options/dynamic.go')
0 files changed, 0 insertions, 0 deletions