-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Predictable URL for release downloads #23817
Comments
This should be simple. I see, if I can can do it tomorrow. |
Well, IIUC the original problem was that multiple releases could have files with the same name attached that lead to collisions. But what I propose is including release tag in path, so cross-release collisions are impossible. I can't imagine why should someone want to have files with identical names in the same release. |
I have currently Problems running Gitea, so I can't do this today. Maybe next week. |
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 <[email protected]>
Feature Description
It would be very helpful if released files had a predictable URL, so that it would be possible to download them without knowing a Gitea internal UUID. It is needed for automation scripts.
E. g. such URL could have a path
/<project_path>/releases/tag/<tag_name>/assets/<file_name>
.Screenshots
No response
The text was updated successfully, but these errors were encountered: