Merge pull request 'Implement external release assets' (#1445) from maltejur/forgejo:forgejo-external-attachments into forgejo

Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/1445
Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
This commit is contained in:
Earl Warren 2024-07-30 15:50:57 +00:00
commit 94933470cd
22 changed files with 826 additions and 119 deletions

View file

@ -18,10 +18,14 @@ type Attachment struct {
Created time.Time `json:"created_at"`
UUID string `json:"uuid"`
DownloadURL string `json:"browser_download_url"`
// Enum: attachment,external
Type string `json:"type"`
}
// EditAttachmentOptions options for editing attachments
// swagger:model
type EditAttachmentOptions struct {
Name string `json:"name"`
// (Can only be set if existing attachment is of external type)
DownloadURL string `json:"browser_download_url"`
}