Download Release Attachment via API #8539

Open
opened 2025-11-02 08:10:15 -06:00 by GiteaMirror · 5 comments
Owner

Originally created by @noetzold on GitHub (Feb 10, 2022).

Feature Description

When using the API to download release attachment via /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} a download link is provided. But downloading requires login. So, the use of this API call is verry limited. Is would be nice to have a way downloading the attachment with an access token.

Screenshots

No response

Originally created by @noetzold on GitHub (Feb 10, 2022). ### Feature Description When using the API to download release attachment via /repos/{owner}/{repo}/releases/{id}/assets/{attachment_id} a download link is provided. But downloading requires login. So, the use of this API call is verry limited. Is would be nice to have a way downloading the attachment with an access token. ### Screenshots _No response_
GiteaMirror added the type/proposal label 2025-11-02 08:10:15 -06:00
Author
Owner
@6543 commented on GitHub (Feb 10, 2022): https://try.gitea.io/api/swagger#/repository/repoGetReleaseAttachment
Author
Owner

@noetzold commented on GitHub (Feb 10, 2022):

Yes, this is the API call returning a “browser_download_url”
For example:
https://try.gitea.io/api/v1/repos/fnetx/testing-gitea-releases/releases/3318489/assets/2114?access_token=12345
"browser_download_url": "https://try.gitea.io/attachments/f505c259-0ccf-4b66-893d-1f4880f236aa"

But when using authorization a login with user/password is required for downloading the file.

@noetzold commented on GitHub (Feb 10, 2022): Yes, this is the API call returning a “browser_download_url” For example: https://try.gitea.io/api/v1/repos/fnetx/testing-gitea-releases/releases/3318489/assets/2114?access_token=12345 "browser_download_url": "https://try.gitea.io/attachments/f505c259-0ccf-4b66-893d-1f4880f236aa" But when using authorization a login with user/password is required for downloading the file.
Author
Owner

@6543 commented on GitHub (Feb 10, 2022):

well either add token auth to this endpoint or add a new endpoint ...

@6543 commented on GitHub (Feb 10, 2022): well either add token auth to this endpoint or add a new endpoint ...
Author
Owner

@ajtuma commented on GitHub (Aug 22, 2023):

A new endpoint... Could you please explain it more widely?

@ajtuma commented on GitHub (Aug 22, 2023): A new endpoint... Could you please explain it more widely?
Author
Owner

@lunny commented on GitHub (Aug 22, 2023):

#26430 should fix this issue.

@lunny commented on GitHub (Aug 22, 2023): #26430 should fix this issue.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#8539