Attachment Module
The attachment module provides dynamic endpoints for file management using RecordTableType + RecordFunctionType in config/attachments.php.
Scope
- Upload and optional image resizing
- Attachment metadata management
- Link/unlink attachments to arbitrary records
- Folder organization
- Public/private/temp visibility strategies
- Temp attachment lifecycle with timeout and cleanup command
Data Tables
sp_attachmentssp_attachment_linkssp_attachment_folders(renamed fromsp_document_folders; the old config key is kept registered, pointing at the same table, as a deprecated alias for the generic/{table}CRUD route — see Attachment Folder Management)
Main Endpoints
POST /{api_prefix}/{attachment_prefix}/uploadPOST /{api_prefix}/{attachment_prefix}/clone-tempGET /{api_prefix}/{attachment_prefix}/{id}/view(optional read-time resizing)GET /{api_prefix}/{attachment_prefix}/{id}/downloadGET|POST /{api_prefix}/{attachment_prefix}/record/{table}/{record_id}DELETE /{api_prefix}/{attachment_prefix}/record/{table}/{record_id}/{attachment_id}GET|POST /{api_prefix}/{attachment_prefix}/foldersPUT|PATCH|DELETE /{api_prefix}/{attachment_prefix}/folders/{id}