Skip to content

Comment API with attachment #57

Description

@rashed2014

Hello, it seems there are some issues with the comment API with Attachment. I am able to send .txt file but nothing else. Not even .JPG. I keep getting [ERROR] 'ascii' codec can't decode byte 0xef in position 407: ordinal not in range(128). Here is my code:

file_open = file(full_filename)
content = {

 "content": {
'id': _ticket,
'Action': 'comment',
'Text': comment_text,
'Attachment': uploaded_filename
},
'attachment_1': file_open
}

resource = RTResource(uri, username, password,
CookieAuthenticator)

response = resource.post(path='ticket/' + _ticket + '/comment', payload=content, )

Any suggestion?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions