update function to add inline attachment

dev
Oana Ursuleasa 2025-02-19 15:12:37 +02:00
rodzic 9e859850df
commit 7fa7a7f07e
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -42,7 +42,7 @@ class CreateCardClass{
$hasCid = preg_match('/!\[.*?\]\(cid:[^)]+\)/', $description);
if (!empty($attachments)) {
foreach ($attachments as $attachment) {
$filePath = NC_SERVER .'/remote.php/dav/files/'.NC_USER.'/Deck/'.$attachment;
$filePath = NC_SERVER .'/remote.php/dav/files/'.NC_ADMIN_USER.'/Deck/'.$attachment;
if ($hasCid) {
$description = preg_replace('/!\[' . preg_quote($attachment, '/') . '\]\(cid:[^)]+\)/',"[$attachment]($filePath)", $description);
}else{