diff --git a/lib/DeckClass.php b/lib/DeckClass.php index 001eea2..92864a5 100644 --- a/lib/DeckClass.php +++ b/lib/DeckClass.php @@ -103,14 +103,14 @@ class DeckClass { public function addAttachment($data) { global $mailData; global $cardId; - $fullPath = 'D:/projects/Deck API'; // /var/www/nextcloud/apps/mailtodeck + $fullPath = getcwd() . "/attachments/"; //get full path to attachments dirctory for ($i = 1; $i < count($mailData->fileAttached); $i++) { $data = array( - 'file' => new CURLFile("$fullPath/attachments/" . $mailData->fileAttached[$i]) + 'file' => new CURLFile($fullPath . $mailData->fileAttached[$i]) ); $this->apiCall("", NC_SERVER . "/index.php/apps/deck/api/v1.0/boards/1/stacks/1/cards/$cardId/attachments?type=deck_file", $data); } } } -?> \ No newline at end of file +?>