Merge pull request #4 from bpehrs11/Fix-Hardcoded-Attachment-Folder-Path

Fix hardcoded path of attachments directory
pull/12/head
Lucian Pricop 2022-01-03 14:23:17 +02:00 zatwierdzone przez GitHub
commit bc5168b1b0
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
1 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -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);
}
}
}
?>
?>