diff --git a/mastodonapi.php b/mastodonapi.php index d8701f6..33181ee 100644 --- a/mastodonapi.php +++ b/mastodonapi.php @@ -109,10 +109,13 @@ class YellowMastodonapi { $fileName = date("Y-m-d", strtotime($createdAt)) . "-" . $titleSlug . ".md"; $fullPath = $this->yellow->system->get("coreServerDocument") . $targetFolder . $fileName; if ( file_exists($fullPath) ) continue; + + // Korrektur Blog-Ordner Rechte if ( !is_dir(dirname($fullPath)) ) { mkdir(dirname($fullPath), 0777, true); chmod(dirname($fullPath), 0777); } + $imageFilenames = array(); $imageAltTexts = array(); foreach ( $post["media_attachments"] ?? array() as $media ) { @@ -141,6 +144,7 @@ class YellowMastodonapi { $imageUrl = $media["remote_url"] ?? $media["url"] ?? $media["preview_url"] ?? null; if ( empty($imageUrl) ) return false; + // Korrektur Bilder-Ordner Rechte if ( !is_dir($dirPath) ) { mkdir($dirPath, 0777, true); chmod($dirPath, 0777);