
Anonymous Community User asked a question.
Adding a comment file through API with App authentication
Hi, I am trying to add a comment with an attachment through the Podio API (using app authentication method) with the code below: (...) $podio_file_id = PodioFile::upload( $attachment['tmp_name'], $attachment['name'] ); $args = array( 'value' => $message, ); if ( ! is_null( $podio_file_id ) ) { $args['file'] = $podio_file_id; } return PodioComment::create( 'item', $ticket_id, $args ); (...) When the upload is done I get a $podio_file_id, and the comment creation doesn't return any errors, however the comment is created without an attached file. Is there anything wrong with the code or am I missing something else? Thanks, Marco