Image Attachments for Filaments #17

Open
opened 2026-01-16 04:25:50 +00:00 by tonym · 0 comments
Owner

Summary

Allow attaching images and documents to filament records.

Upstream Issues

Problem

The color hex field alone does not capture:

  • Visual appearance of specialty filaments (translucent, glitter, marble, silk)
  • Safety Data Sheets (SDS) from manufacturers
  • Technical Data Sheets with print settings
  • Sample print photos

Proposed Solution

Database

  • Add FilamentAttachment table (supports images and documents)
  • Fields: filament_id, filename, file_type, url/path, description

Backend

  • File upload endpoint (store in data directory)
  • Serve files via static route
  • Thumbnail generation for images
  • Support PDF, images, text files

Frontend

  • File upload in filament create/edit form
  • Show image thumbnails in filament list
  • Document list with download links
  • Full image gallery in detail page

File Types

  • Images: jpg, png, gif, webp
  • Documents: pdf, txt (SDS, TDS)
  • Max file size limit (configurable)

Considerations

  • Storage: local filesystem vs external URL
  • Security: validate file types, scan uploads
  • Could extend to Spool records too
## Summary Allow attaching images and documents to filament records. ## Upstream Issues - https://github.com/Donkie/Spoolman/issues/740 - Image attachments - https://github.com/Donkie/Spoolman/issues/395 - SDS/Technical Data Sheets ## Problem The color hex field alone does not capture: - Visual appearance of specialty filaments (translucent, glitter, marble, silk) - Safety Data Sheets (SDS) from manufacturers - Technical Data Sheets with print settings - Sample print photos ## Proposed Solution ### Database - Add FilamentAttachment table (supports images and documents) - Fields: filament_id, filename, file_type, url/path, description ### Backend - File upload endpoint (store in data directory) - Serve files via static route - Thumbnail generation for images - Support PDF, images, text files ### Frontend - File upload in filament create/edit form - Show image thumbnails in filament list - Document list with download links - Full image gallery in detail page ### File Types - Images: jpg, png, gif, webp - Documents: pdf, txt (SDS, TDS) - Max file size limit (configurable) ## Considerations - Storage: local filesystem vs external URL - Security: validate file types, scan uploads - Could extend to Spool records too
Sign in to join this conversation.
No Label
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: tonym/spoolman2#17
No description provided.