kopia lustrzana https://github.com/newroco/mail2deck
Merge pull request #4 from bpehrs11/Fix-Hardcoded-Attachment-Folder-Path
Fix hardcoded path of attachments directorypull/12/head
commit
bc5168b1b0
|
@ -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);
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
?>
|
||||
|
|
Ładowanie…
Reference in New Issue