I am creating API for creates task in Active Collab and I have been successful for get
and set
name of new task, message and due date.
However, when I insert image or file it's not creating task.
Below is my code so please help me to solve it.
try {
API::call('projects/60/tasks/add', null, array(
'task[name]' => $_POST['name'],
'task[body]' => $_POST['message'],
'task[priority]' => $priority,
'task[due_on]' => $date,
'task[assignee_id]' => 21,
), array(
'a.png' /* This array is for attach image to this task but not working in my case and I found this from https://help-classic.activecollab.com/books/api/sdk.html */
));
echo 'Ticket Created Successfully.';
} catch(AppException $e) {
print $e->getMessage() . '<br><br>';
var_dump($e->getServerResponse());
}