---
tags: [attachments, controller]
module: Attachments
---

# GeneralAttachmentController

## Connections
[[_Attachments]] · [[[Model]GeneralAttachment]] · [[[Service]AttachmentServices]] · [[[Routes]Routes]]

## Source
```
Modules/Attachments/Http/Controllers/GeneralAttachmentController.php
```

## Methods

| Method | Route | Permission |
|---|---|---|
| index | GET /general-attachments | attachments.general-attachments.view |
| create | GET /general-attachments/create | attachments.general-attachments.create |
| store | POST /general-attachments | attachments.general-attachments.create |
| show | GET /general-attachments/{attachment} | attachments.general-attachments.view |
| edit | GET /general-attachments/{attachment}/edit | attachments.general-attachments.edit |
| update | PUT /general-attachments/{attachment} | attachments.general-attachments.edit |
| destroy | DELETE /general-attachments/{attachment} | attachments.general-attachments.delete |

## Notes
- `store` checks for `API-Agent` header — if present, uses `ConvertingEncodedStringsToFileService` to decode base64 file before upload
- `edit` and `update` are stubs (unimplemented)
- Extends `TenantBaseController`
