diff --git a/app/Notification/Providers/DiscordWebHookNotification.php b/app/Notification/Providers/DiscordWebHookNotification.php index 12f9719..e6f7676 100644 --- a/app/Notification/Providers/DiscordWebHookNotification.php +++ b/app/Notification/Providers/DiscordWebHookNotification.php @@ -74,8 +74,8 @@ class DiscordWebHookNotification extends NotificationProvider { ]; if ($notification->getImageURL() !== null && is_file($notification->getImageProjectPath())) { + $formData['file'] = curl_file_create($notification->getImageProjectPath(), 'image/png', 'image.png'); } - $formData['file'] = curl_file_create($notification->getImageProjectPath(), 'image/png', 'image.png'); $ch = curl_init($webHookUrl); curl_setopt($ch, CURLOPT_HTTPHEADER, array('Content-type: multipart/form-data'));