Files are being added to Kanboard, database can see it assigns a new filename in the data folder. Folder is empty. If the file is an image, you can see a thumb of the image in the task, but no file is copied. This script running same permissions as Kanboard.
function importAttachment($file, $taskId)
{
if (!file_exists($tmp_ext_dir.DIRECTORY_SEPARATOR.$file['filePath'])) {
throw new \Exception(t('File not found: %s', $tmp_ext_dir.DIRECTORY_SEPARATOR.$file['filePath']));
}
$file_model = $this->taskFileModel;
$file_data = array(
'name' => $file['fileName'],
'tmp_name' => $tmp_ext_dir.DIRECTORY_SEPARATOR.$file['filePath'],
'size' => $file['fileSize'],
'error' => UPLOAD_ERR_OK
);
$file_id = $file_model->uploadFile($taskId, $file_data);
}