-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
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
Offer a download link to specific release file #3712
Comments
I'm not sure how it could be handled when a release offers multiple files with the same name, but who does that anyway? |
If semantic versioning of tags is taken into account I like the idea |
|
I'm currently working on this and am unsure how to "cleanly" tackle the problem of multiple attachements with the same name, do you think it would make sense to ban attachements with the same file name? If not any ideas of how to make every single attachement accessible, including files with the same name? |
I think that attachments with same name should not be allowed |
I request this or similar also please. i was using https://dl.gitea.io/gitea/master/gitea-master-linux-amd64 up until very recently, now it no longer exists, so my weekly update script no longer works. |
@meoso it will be back soon again, we did move over infra to larger disk space, so not everything is back. As soon as our drone instance will be fully working again master downloads will be available again |
I think it should also be integrated into the API. |
Handling multiple attachments with the exact same filename sounds like the If I understand the specification of said header correctly, it could just return a list of attachments in a similar vein as the API already does for retrieving the attachments ( And that way it could later on be potentially extended to match with just partial filenames ( |
Is anyone currently working on this? If not I would start working on this. |
This comment was marked as off-topic.
This comment was marked as off-topic.
|
I have had build a very simple api wrapper which (for now) does only a 307 (basically the same as 302) to the actual file.
eg: /garionion/fluffychat/releases/download/tag:v1.3.0/fluffychat-linux-x86.tar.zst I wanted to do actual proxying and maybe caching but if gitea itself gets this feature i may abandon my "solution" EDIT: |
I did some work today on this and i fugured out that gitea currently provides an api for at least tag-based access to attachments; eg: This now poses the problem that the new API cannot be implemented directly since it would require to remove the already existing API and thus making this feature a breaking change. So the question is: do we want to switch to the new API / URL scheme or do we want an alternative route for this? |
Is anyone working on this? It looks pretty straightforward to implement. Add another route like this one : https://github.com/go-gitea/gitea/blob/main/routers/web/web.go#L961 to signify "latest" (we can't just specify a |
How about one-upping GitHub and offering a direct download link to any file from any release. The best way I can think of would be with the following URL scheme, I don't they could interfere with any current ones.
/{user}/{repo}/releases/download/latest/{name}
name
from latest stable release/{user}/{repo}/releases/download/latest:stable/{name}
name
from latest stable release/{user}/{repo}/releases/download/latest:prerelease/{name}
name
from latest prerelease/{user}/{repo}/releases/download/tag:{tag}/{name}
name
from specific releasetag
The URLs should 302 to the attachement URL, if no file or release exists it should 404. If you like the idea but have bigger priorities I could look into implementing it myself, though it will take some time since I've never contributed to a big project, nor used Go.
This is really useful to provide a static URL to the latest release similar to
wordpress.org/latest.zip
that can be used by scripts. Instead it would look more like/wordpress/wordpress/releases/download/latest/wordpress.zip
.The text was updated successfully, but these errors were encountered: