-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Simple fix release attachment links to human readable #21798
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
Conversation
close #10919, which is stalled for a long time. Before https://gitea.com/attachments/c15910d0-736c-4dc3-846b-6440ad2048fd After https://gitea.com/gitea/tea/releases/download/v0.9.0/tea-0.9.0-darwin-amd64 Signed-off-by: Xinyu Zhou <[email protected]>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested it on try.gitea using
document.querySelector('a[href="https://gitea.com/attachments/e670ea07-5998-443d-95c0-fd64c91cd06b"]').href="https://gitea.com/gitea/distea/releases/download/v0.0.5/distea_0.0.5_linux_x86_64.tar.gz"
It works.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was one:
I see WIP.... from 2020 |
Yup, I do not understand the blocker of the problem at the moment and haven't looked into it carefully. So I just hold my reviews. ps: according to the comments in #13750, if I understand correctly, the problem is that the same "tag" may point to different attachments, which cause conflicts. |
Well, as far as I've seen the original problem was that only the first attachment with that name can be downloaded. |
What GitHub does is just show: "An attachment with that filename alreadly exists." |
Yes, that's also my proposed behavior, at least for the first step. |
This comment was marked as resolved.
This comment was marked as resolved.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sorry that does not solve the unerlying issue
it was done so intentionaly
see #13750 - please fix the open TODOs first and I'll ack to this (didn't had time myself to do so...) PS: you can append this into this pull |
The current workflow is:
I'm afraid the current workflow is hard to change correctly. Maybe a simple policy should be in the upload stage to check if each attachment of a release has the same name. When I upload a file on GitHub, the frontend sends a POST containing name, size, content_type, authentication_token, repository_id, release_id The GitHub server can easily check whether the attachments under a release have the same name according to repository_id, release_id, name |
The problem is when creating a new release, how should we check the same filename? I think maybe we have to check them in frontend whatever creating or updating a release and only do backend duplicated filenames check when updating a release. |
close #10919, which is stalled for a long time.
Before
After
Next step: