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:
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user