gitea/routers/web
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>
2023-04-12 17:05:23 +08:00
..
admin Use auto-updating, natively hoverable, localized time elements (#23988) 2023-04-11 01:01:20 +02:00
auth Group template helper functions, remove Printf, improve template error messages (#23982) 2023-04-08 21:15:22 +08:00
devtest Introduce GitHub markdown editor, keep EasyMDE as fallback (#23876) 2023-04-03 18:06:57 +08:00
events
explore
feed User/Org Feed render description as per web (#23887) 2023-04-04 04:39:47 +01:00
healthcheck
misc Introduce GitHub markdown editor, keep EasyMDE as fallback (#23876) 2023-04-03 18:06:57 +08:00
org Add cardtype to org/user level project on creation, edit and view (#24043) 2023-04-11 14:28:40 -04:00
repo Make Release Download URLs predictable (#23891) 2023-04-12 17:05:23 +08:00
shared
user
auth_windows.go
auth.go
base.go
goget.go
home.go
metrics.go
nodeinfo.go
swagger_json.go Group template helper functions, remove Printf, improve template error messages (#23982) 2023-04-08 21:15:22 +08:00
web.go Support "." char as user name for User/Orgs in RSS/ATOM/GPG/KEYS path ... (#23874) 2023-04-07 18:08:36 +08:00
webfinger.go Use User.ID instead of User.Name in ActivityPub API for Person IRI (#23823) 2023-04-04 10:08:23 +08:00