[PR #673] [MERGED] Attach to release #15521

Closed
opened 2025-11-02 11:48:30 -06:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/go-gitea/gitea/pull/673
Author: @couling
Created: 1/15/2017
Status: Merged
Merged: 1/15/2017
Merged by: @lunny

Base: masterHead: attach-to-release


📝 Commits (6)

  • 21927a9 Moved attachaments POST url from /issues/attachments to /attachments
  • a487fa8 Implemented attachment upload on release page
  • aa4d9e0 Implemented downloading attachments on the release page
  • 497b38f Added zip and gzip files to default allowed attachments
  • 2df05d1 Implemented uploading attachments on edit release
  • 0e05278 Renamed UploadIssueAttachment to UploadAttachment

📊 Changes

11 files changed (+144 additions, -14 deletions)

View changed files

📝 cmd/web.go (+1 -3)
📝 conf/app.ini (+1 -1)
📝 models/release.go (+100 -2)
📝 modules/auth/repo_form.go (+2 -0)
📝 modules/setting/setting.go (+1 -1)
📝 routers/api/v1/repo/release.go (+2 -2)
📝 routers/repo/issue.go (+2 -2)
📝 routers/repo/release.go (+21 -2)
📝 templates/repo/issue/comment_tab.tmpl (+1 -1)
📝 templates/repo/release/list.tmpl (+9 -0)
📝 templates/repo/release/new.tmpl (+4 -0)

📄 Description

Implemented attaching files to a release as requested in #282

There is already a field in the Attachment table which is unused not used called ReleaseID. This allows an attachment to be associated with a release. This PR:

  • Adds an upload box for users to upload attachments when creating / editing a release.
  • Associates uploaded attachments with releases using the existing ReleaseID field
  • Adds attachments as download links on the release page below source zip and tar links
  • Moves attachments POST URL from /issues/attachments to /attachments (the GET url was already /attachments)
  • Changes default upload file types to include zip and gzip files as these are the most likely files to attach to a release

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/go-gitea/gitea/pull/673 **Author:** [@couling](https://github.com/couling) **Created:** 1/15/2017 **Status:** ✅ Merged **Merged:** 1/15/2017 **Merged by:** [@lunny](https://github.com/lunny) **Base:** `master` ← **Head:** `attach-to-release` --- ### 📝 Commits (6) - [`21927a9`](https://github.com/go-gitea/gitea/commit/21927a98681bfc597a77eb7f6e68fd533f142ec0) Moved attachaments POST url from /issues/attachments to /attachments - [`a487fa8`](https://github.com/go-gitea/gitea/commit/a487fa8ef7012007a6c9d89a810403a39b568aea) Implemented attachment upload on release page - [`aa4d9e0`](https://github.com/go-gitea/gitea/commit/aa4d9e085adcb5a210bb14d5f4749a1ae2d87830) Implemented downloading attachments on the release page - [`497b38f`](https://github.com/go-gitea/gitea/commit/497b38fbfac9659100ea0f3f50aff5484afdab27) Added zip and gzip files to default allowed attachments - [`2df05d1`](https://github.com/go-gitea/gitea/commit/2df05d14d017e2c3f0621c87b6ba1e255be54026) Implemented uploading attachments on edit release - [`0e05278`](https://github.com/go-gitea/gitea/commit/0e05278015c5fe83bd300447ac27a22986a2a139) Renamed UploadIssueAttachment to UploadAttachment ### 📊 Changes **11 files changed** (+144 additions, -14 deletions) <details> <summary>View changed files</summary> 📝 `cmd/web.go` (+1 -3) 📝 `conf/app.ini` (+1 -1) 📝 `models/release.go` (+100 -2) 📝 `modules/auth/repo_form.go` (+2 -0) 📝 `modules/setting/setting.go` (+1 -1) 📝 `routers/api/v1/repo/release.go` (+2 -2) 📝 `routers/repo/issue.go` (+2 -2) 📝 `routers/repo/release.go` (+21 -2) 📝 `templates/repo/issue/comment_tab.tmpl` (+1 -1) 📝 `templates/repo/release/list.tmpl` (+9 -0) 📝 `templates/repo/release/new.tmpl` (+4 -0) </details> ### 📄 Description Implemented attaching files to a release as requested in #282 There is already a field in the Attachment table which is unused not used called ReleaseID. This allows an attachment to be associated with a release. This PR: - Adds an upload box for users to upload attachments when creating / editing a release. - Associates uploaded attachments with releases using the existing ReleaseID field - Adds attachments as download links on the release page below source zip and tar links - Moves attachments POST URL from `/issues/attachments` to `/attachments` (the GET url was already `/attachments`) - Changes default upload file types to include zip and gzip files as these are the most likely files to attach to a release --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2025-11-02 11:48:30 -06:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#15521