-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
[BUG][API] Issue/pr attachments return wrong download url #27204
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
Comments
I think this was fixed in 1.21 already, |
I just quickly checked 1.21 rc0 and the issue is still there. |
Maybe it could be fixed by #26430 . |
Release |
The backport is #27378. That PR allow token visit web routers |
@lunny sure. Can you point me to download a binary for linux_x64 if possible as I do not have Gitea dev setup. |
Unfortunately there is not and if you don't need sqlite support I can build one for you. |
Feel free to share, I can set it up with any other db like MySQL or MariaDB even though I use sqlite for testing. |
What's your favorite OS? |
I work on Manjaro mostly. |
Thanks. I have tested it and the URL seems to be the same as web version now.
Haven't tested with token as header for private repositories. But maybe that is out of scope or not a needed thing right now. All good now. |
Yes, since web routers cannot be ignored and Github also point to a web router. I revert my previous change. Thank you for your confirmation. |
Backport #27486 by @lunny Fix #27204 This PR allows `/<username>/<reponame>/attachments/<uuid>` access with personal access token and also changed attachments API download url to it so it can be download correctly. Co-authored-by: Lunny Xiao <[email protected]>
Backport #27486 by @lunny Fix #27204 This PR allows `/<username>/<reponame>/attachments/<uuid>` access with personal access token and also changed attachments API download url to it so it can be download correctly. Co-authored-by: Lunny Xiao <[email protected]>
Backport go-gitea#27486 by @lunny Fix go-gitea#27204 This PR allows `/<username>/<reponame>/attachments/<uuid>` access with personal access token and also changed attachments API download url to it so it can be download correctly. Co-authored-by: Lunny Xiao <[email protected]> (cherry picked from commit 7b96f71)
Description
The issue attachment API return the following:
This is a possible bug because the
browser_download_url
is broken to me. This may also affect the comments attachment API too.The
browser_download_url
should be a proper downloadable URL like how it is in the releases.Gitea Version
1.20.3
Can you reproduce the bug on the Gitea demo site?
Yes
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
Codeberg and Gitea 1.20.3 for testing on local setup.
https://codeberg.org/api/v1/repos/gitnex/GitNex/issues/1300/assets
Database
None
The text was updated successfully, but these errors were encountered: