[PR #205] [MERGED] Implementation of File Attachments #5613

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

📋 Pull Request Information

Original PR: https://github.com/BookStackApp/BookStack/pull/205
Author: @ssddanbrown
Created: 10/9/2016
Status: Merged
Merged: 10/23/2016
Merged by: @ssddanbrown

Base: masterHead: attachments


📝 Commits (7)

  • 673c74d Started work on attachments
  • ac0b29f Added view, deletion and permissions for files
  • 89509b4 Added attachment creation from link/name
  • 867fc8b Added basic attachment editing functionality
  • 7ee695d File upload deletion complete & added extension handling
  • 9122023 Added in attachment tests
  • 3045840 Page Attachments - Improved UI, Now initially complete

📊 Changes

26 files changed (+1289 additions, -85 deletions)

View changed files

app/Exceptions/FileUploadException.php (+4 -0)
app/File.php (+36 -0)
📝 app/Http/Controllers/Controller.php (+27 -6)
app/Http/Controllers/FileController.php (+214 -0)
📝 app/Page.php (+9 -0)
📝 app/Repos/PageRepo.php (+9 -1)
app/Services/FileService.php (+204 -0)
📝 app/Services/ImageService.php (+25 -40)
app/Services/UploadService.php (+64 -0)
📝 config/filesystems.php (+1 -1)
database/migrations/2016_10_09_142037_create_files_table.php (+71 -0)
📝 resources/assets/js/controllers.js (+200 -1)
📝 resources/assets/js/directives.js (+60 -6)
📝 resources/assets/sass/_components.scss (+15 -5)
📝 resources/assets/sass/_pages.scss (+3 -19)
📝 resources/assets/sass/_tables.scss (+10 -0)
📝 resources/views/pages/form-toolbox.blade.php (+99 -2)
📝 resources/views/pages/sidebar-tree-list.blade.php (+9 -2)
📝 resources/views/partials/custom-styles.blade.php (+1 -1)
📝 resources/views/settings/roles/form.blade.php (+13 -0)

...and 6 more files

📄 Description

The pull request tracks the implementation of File attachments. Attachments will be able to be added to a page, via the page edit view and will be editable and sortable.

Attachments will consist of both file uploads and links to other systems such as box, dropbox, google drive etc. These systems will not be integrated (At least initially) but the attachments area will simply accept a url input.

Uploads will be behind the application, Non publically accessible. To access a file the user must have access to view the page it's been uploaded to. Uploads will be able to be stored on the filesystem or any cloud filesystem Laravel supports by default.

In reference to #62.

Feature Status

  • Data model
  • Creation via file upload
  • Creation via Link
  • Visible listing (On page view)
  • Sorting (Drag and drop)
  • File upload permission implementation
  • Editing
  • Deletion via user
  • Deletion via Page deletion
  • UI & Design Improvements and fixes
  • PHPunit Tests to cover basic functionality

🔄 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/205 **Author:** [@ssddanbrown](https://github.com/ssddanbrown) **Created:** 10/9/2016 **Status:** ✅ Merged **Merged:** 10/23/2016 **Merged by:** [@ssddanbrown](https://github.com/ssddanbrown) **Base:** `master` ← **Head:** `attachments` --- ### 📝 Commits (7) - [`673c74d`](https://github.com/BookStackApp/BookStack/commit/673c74ddfc59677b55d0d7438038342f8d138569) Started work on attachments - [`ac0b29f`](https://github.com/BookStackApp/BookStack/commit/ac0b29fb6d05d6e943419b91fdbc09a59e20c89f) Added view, deletion and permissions for files - [`89509b4`](https://github.com/BookStackApp/BookStack/commit/89509b487af222ae9c9bc6c58c04b0790cc29b09) Added attachment creation from link/name - [`867fc8b`](https://github.com/BookStackApp/BookStack/commit/867fc8be64ec41c41c5646499c1aa34c1e817d53) Added basic attachment editing functionality - [`7ee695d`](https://github.com/BookStackApp/BookStack/commit/7ee695d74a4278b6ecc9a5e1f5537a971d835366) File upload deletion complete & added extension handling - [`9122023`](https://github.com/BookStackApp/BookStack/commit/91220239e5d545115ae5844fa978eb5541e4d77e) Added in attachment tests - [`3045840`](https://github.com/BookStackApp/BookStack/commit/30458405ce55ca84493e197449ad48f64a8c4cd6) Page Attachments - Improved UI, Now initially complete ### 📊 Changes **26 files changed** (+1289 additions, -85 deletions) <details> <summary>View changed files</summary> ➕ `app/Exceptions/FileUploadException.php` (+4 -0) ➕ `app/File.php` (+36 -0) 📝 `app/Http/Controllers/Controller.php` (+27 -6) ➕ `app/Http/Controllers/FileController.php` (+214 -0) 📝 `app/Page.php` (+9 -0) 📝 `app/Repos/PageRepo.php` (+9 -1) ➕ `app/Services/FileService.php` (+204 -0) 📝 `app/Services/ImageService.php` (+25 -40) ➕ `app/Services/UploadService.php` (+64 -0) 📝 `config/filesystems.php` (+1 -1) ➕ `database/migrations/2016_10_09_142037_create_files_table.php` (+71 -0) 📝 `resources/assets/js/controllers.js` (+200 -1) 📝 `resources/assets/js/directives.js` (+60 -6) 📝 `resources/assets/sass/_components.scss` (+15 -5) 📝 `resources/assets/sass/_pages.scss` (+3 -19) 📝 `resources/assets/sass/_tables.scss` (+10 -0) 📝 `resources/views/pages/form-toolbox.blade.php` (+99 -2) 📝 `resources/views/pages/sidebar-tree-list.blade.php` (+9 -2) 📝 `resources/views/partials/custom-styles.blade.php` (+1 -1) 📝 `resources/views/settings/roles/form.blade.php` (+13 -0) _...and 6 more files_ </details> ### 📄 Description The pull request tracks the implementation of File attachments. Attachments will be able to be added to a page, via the page edit view and will be editable and sortable. Attachments will consist of both file uploads and links to other systems such as box, dropbox, google drive etc. These systems will not be integrated (At least initially) but the attachments area will simply accept a url input. Uploads will be behind the application, Non publically accessible. To access a file the user must have access to view the page it's been uploaded to. Uploads will be able to be stored on the filesystem or any cloud filesystem Laravel supports by default. In reference to #62. ### Feature Status - [x] Data model - [x] Creation via file upload - [x] Creation via Link - [x] Visible listing (On page view) - [x] Sorting (Drag and drop) - [x] File upload permission implementation - [x] Editing - [x] Deletion via user - [x] Deletion via Page deletion - [x] UI & Design Improvements and fixes - [x] PHPunit Tests to cover basic functionality --- <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:12:20 +03:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/BookStack#5613