This is for both creating a attachment on an existing card as well as with creating a new card.
However, if the attachment is a TXT file, the attachment is created so the call is being made properly. I’m guessing that a PDF has to be encoded but there is nothing in the docs that says that.
What would be the correct way to attach a PDF via the API?
I’m making the call in PowerShell, but I can also use cURL.
Second, I’d recommend following whatever the Trello web client does. To do so, open your browser’s console and watch the network as you attach a .pdf to a card.
Hi,
Thank you for the tip. However the glitch project and the web GUI is only for adding attachments to an existing card. I would like to create a new card with an attachment via the API which is where I am struggling with because of limited documentation:
Update:
I figured it out. The file needs to be in a form using system.io.fileinfo . I’m on PowerShell 7 and I believe you might have to get into some .NET to make it work on PS5.1.