how to upload attachment using python API?

i was trying to upload attachment jpg image file.I can upload image using folowing python command
image = “Desktop/test.jpg”
with open(image,“rb”) as f:
data =
client.attachments.create_attachment_for_task(task_gid, file_content=data, file_name=“test”,file_content_type=“image”)

It uploads but does not show the image just like when i upload manually.
how to upload image through python api and make it to be seen in task bar.


There is another thread about exactly the same thing, you should be able to find it using the search.

i think i found your post about it where you’ve posted might be node js code?? but as a beginner python user i still can not find the solution of this. I am googling and trying diferent ways but im still failed to solve this.

Yes I posted my code in node, I can’t really help in Python…

1 Like