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.
gitea/routers/web/repo
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>
2 years ago
..
actions Add job.duration in web ui (#23963) 2 years ago
activity.go Implement FSFE REUSE for golang files (#21840) 2 years ago
attachment.go Make Release Download URLs predictable (#23891) 2 years ago
blame.go Add context cache as a request level cache (#22294) 2 years ago
branch.go Make branches list page operations remember current page (#23420) 2 years ago
cherry_pick.go Rename almost all Ctx functions (#22071) 2 years ago
commit.go Introduce GitHub markdown editor, keep EasyMDE as fallback (#23876) 2 years ago
compare.go Introduce GitHub markdown editor, keep EasyMDE as fallback (#23876) 2 years ago
download.go Use context parameter in models/git (#22367) 2 years ago
editor.go Use graceful editorconfig loader to reduce errors when loading malformed editorconfigs (#21257) 2 years ago
editor_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
find.go Implement FSFE REUSE for golang files (#21840) 2 years ago
helper.go Refactor authors dropdown (send get request from frontend to avoid long wait time) (#23890) 2 years ago
helper_test.go Refactor authors dropdown (send get request from frontend to avoid long wait time) (#23890) 2 years ago
http.go Use context parameter in services/repository (#23186) 2 years ago
http_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
issue.go Fix redirect bug when creating issue from a project (#23971) 2 years ago
issue_content_history.go Move helpers to be prefixed with `gt-` (#22879) 2 years ago
issue_dependency.go Add API to manage issue dependencies (#17935) 2 years ago
issue_label.go Make label templates have consistent behavior and priority (#23749) 2 years ago
issue_label_test.go Make label templates have consistent behavior and priority (#23749) 2 years ago
issue_lock.go Fix improper HTMLURL usages in Go code (#22839) 2 years ago
issue_stopwatch.go Speed up HasUserStopwatch & GetActiveStopwatch (#23051) 2 years ago
issue_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
issue_timetrack.go Fix improper HTMLURL usages in Go code (#22839) 2 years ago
issue_watch.go Fix improper HTMLURL usages in Go code (#22839) 2 years ago
lfs.go Introduce path Clean/Join helper functions (#23495) 2 years ago
main_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
middlewares.go Use graceful editorconfig loader to reduce errors when loading malformed editorconfigs (#21257) 2 years ago
migrate.go Implement FSFE REUSE for golang files (#21840) 2 years ago
milestone.go Rename almost all Ctx functions (#22071) 2 years ago
packages.go Use dynamic package type list (#22263) 2 years ago
patch.go Redirect to the commit page after applying patch (#23056) 2 years ago
projects.go Improve GetBoards and getDefaultBoard (#22981) 2 years ago
projects_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
pull.go Refactor authors dropdown (send get request from frontend to avoid long wait time) (#23890) 2 years ago
pull_review.go Make Ctrl+Enter submit a pending comment (starting review) instead of submitting a single comment (#23245) 2 years ago
release.go Make Release Download URLs predictable (#23891) 2 years ago
release_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
render.go Implement FSFE REUSE for golang files (#21840) 2 years ago
repo.go Make Release Download URLs predictable (#23891) 2 years ago
runners.go Implement actions (#21937) 2 years ago
search.go Fix improper HTMLURL usages in Go code (#22839) 2 years ago
setting.go Use context parameter in services/repository (#23186) 2 years ago
setting_protected_branch.go Use context parameter in services/repository (#23186) 2 years ago
setting_secrets.go Add user secrets (#22191) 2 years ago
settings_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
tag.go Add main landmark to templates and adjust titles (#22670) 2 years ago
topic.go Implement FSFE REUSE for golang files (#21840) 2 years ago
treelist.go Implement FSFE REUSE for golang files (#21840) 2 years ago
view.go Avoid recursing into sub-sub-sub-docs folders when looking for READMEs. (#23695) 2 years ago
view_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago
webhook.go Add user webhooks (#21563) 2 years ago
wiki.go Use context parameter in models/git (#22367) 2 years ago
wiki_test.go Implement FSFE REUSE for golang files (#21840) 2 years ago