Add comment with attachment JSM

I want to add a comment visible on the Customer portal, and include one of the attachments on the issue.
How can I do it? I planning to implement this on a Post-Function.

Hi @DanAlonso14 , i hope this can guide you on how to add the comment.