After following the Working with files and media guide, provide an array of objects under the attachments parameter in the Create comment API, each containing the following properties:
In the Notion app, when viewing a comment uploaded using the API, the user experience is automatically customized based on the detected category of the file upload. For example, uploading a .png file displays your attachment as an inline image instead of a regular file download block.
The file.url is a temporary download link generated at the time of retrieving a comment. See the guide on Retrieving existing files to learn more about accessing the files you upload.