[PR #2986] [MERGED] Attachments API #6106

Closed
opened 2026-02-05 10:24:38 +03:00 by OVERLORD · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/2986
Author: @ssddanbrown
Created: 10/18/2021
Status: Merged
Merged: 10/20/2021
Merged by: @ssddanbrown

Base: masterHead: attachments_api


📝 Commits (4)

  • 32f6ea9 Build out core attachments API controller
  • 2409d18 Added TestCase for attachments API methods
  • 60d4c59 Added attachment API examples during manual testing
  • 7e28c76 Adjusted API docs table

📊 Changes

15 files changed (+644 additions, -23 deletions)

View changed files

app/Http/Controllers/Api/AttachmentApiController.php (+162 -0)
📝 app/Http/Controllers/AttachmentController.php (+2 -2)
📝 app/Uploads/Attachment.php (+33 -6)
📝 app/Uploads/AttachmentService.php (+10 -12)
dev/api/requests/attachments-create.json (+5 -0)
dev/api/requests/attachments-update.json (+5 -0)
dev/api/responses/attachments-create.json (+12 -0)
dev/api/responses/attachments-list.json (+29 -0)
dev/api/responses/attachments-read.json (+25 -0)
dev/api/responses/attachments-update.json (+12 -0)
📝 resources/views/api-docs/parts/getting-started.blade.php (+1 -1)
📝 routes/api.php (+6 -0)
tests/Api/AttachmentsApiTest.php (+330 -0)
📝 tests/Api/TestsApi.php (+10 -0)
📝 tests/Uploads/AttachmentTest.php (+2 -2)

📄 Description

Closes #2942

TODO

  • Controller functionality build
  • Manual endpoint testing
  • Automated endpoint testing
  • Create request/response examples for docs

🔄 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/BookStackApp/BookStack/pull/2986 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 10/18/2021 **Status:** ✅ Merged **Merged:** 10/20/2021 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `master` ← **Head:** `attachments_api` --- ### 📝 Commits (4) - [`32f6ea9`](https://github.com/BookStackApp/BookStack/commit/32f6ea946f00d25b3e70166d4e1bd3ef27d64a33) Build out core attachments API controller - [`2409d18`](https://github.com/BookStackApp/BookStack/commit/2409d1850feeae10b5f0ef6a3f67bc9739881f44) Added TestCase for attachments API methods - [`60d4c59`](https://github.com/BookStackApp/BookStack/commit/60d4c5902b1a3d03ae493fdeabfa09bbf80d844d) Added attachment API examples during manual testing - [`7e28c76`](https://github.com/BookStackApp/BookStack/commit/7e28c76e6fef824d9efcce3d75f5050a389b4c00) Adjusted API docs table ### 📊 Changes **15 files changed** (+644 additions, -23 deletions) <details> <summary>View changed files</summary> ➕ `app/Http/Controllers/Api/AttachmentApiController.php` (+162 -0) 📝 `app/Http/Controllers/AttachmentController.php` (+2 -2) 📝 `app/Uploads/Attachment.php` (+33 -6) 📝 `app/Uploads/AttachmentService.php` (+10 -12) ➕ `dev/api/requests/attachments-create.json` (+5 -0) ➕ `dev/api/requests/attachments-update.json` (+5 -0) ➕ `dev/api/responses/attachments-create.json` (+12 -0) ➕ `dev/api/responses/attachments-list.json` (+29 -0) ➕ `dev/api/responses/attachments-read.json` (+25 -0) ➕ `dev/api/responses/attachments-update.json` (+12 -0) 📝 `resources/views/api-docs/parts/getting-started.blade.php` (+1 -1) 📝 `routes/api.php` (+6 -0) ➕ `tests/Api/AttachmentsApiTest.php` (+330 -0) 📝 `tests/Api/TestsApi.php` (+10 -0) 📝 `tests/Uploads/AttachmentTest.php` (+2 -2) </details> ### 📄 Description Closes #2942 ### TODO - [x] Controller functionality build - [x] Manual endpoint testing - [x] Automated endpoint testing - [x] Create request/response examples for docs --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
OVERLORD added the pull-request label 2026-02-05 10:24:38 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#6106