'Upload an file from device through the Trello API with python

So I am fairly new to using api’s and coding in general but I have been trying for ages now to use the Trello API to upload an image I have in the same folder as my python file to the new card I just created.

I’m using python and pretty much everything else works, I can create a new name and a new description (they get added to the cards) but when I try add a file or a url nothing gets added.

Is there anyone with a snippet of code or an example of code that works?



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source