feat(webhook): handle Apprise file attachments and add request logging

working for Home Assistant, Changedetector.io, *arrs, Jellyfin...

- Add multipart/form-data file attachment handling in WebhookController
- Support raw data attachments in TalkService
- Log raw request details for debugging
This commit is contained in:
kyle
2026-06-14 00:19:47 -07:00
parent 4aa779c51f
commit 7b14ecbcbb
2 changed files with 90 additions and 1 deletions
+12
View File
@@ -866,6 +866,18 @@ class TalkService {
$richObjects[] = $richObj;
}
}
} elseif (!empty($attachment['data'] ?? '')) {
// Raw data attachment (extracted from standalone multipart part)
$fileData = $attachment['data'];
$fileName = $attachment['filename'] ?? 'attachment';
$mimeType = $attachment['mimeType'] ?? 'application/octet-stream';
$uploadPath = $this->uploadImage($roomToken, $fileName, $fileData, $mimeType);
if ($uploadPath !== null) {
$richObj = $this->buildRichObject($uploadPath, $mimeType, $roomToken);
if ($richObj !== null) {
$richObjects[] = $richObj;
}
}
}
}
}