You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
added 'ContentType' = 'multipart/form-data' to the $RestParams for the Invoke-RestMethod API call.
None work. Removing -fileSource allows the new card to be created. What is the correct way or syntax to add an attachment via New-TrelloCard?
My guess is this has something to do with the encoding as Add-TrelloCardAttachment works fine with .txt but fails with PDF
Update:
I figured it out doing the API call direct. 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.
The text was updated successfully, but these errors were encountered:
user8446
changed the title
[Feature Request] Attachments in New-TrelloCard
Correct way to add attachments by file in New-TrelloCard
Sep 28, 2020
user8446
changed the title
Correct way to add attachments by file in New-TrelloCard
Correct way to add PDF attachments by file in New-TrelloCard
Sep 29, 2020
Hi Adam,
I have tried
-fileSource "C:Path\Path\File.pdf"
and
and
and
added
'ContentType' = 'multipart/form-data'
to the$RestParams
for theInvoke-RestMethod
API call.None work. Removing
-fileSource
allows the new card to be created. What is the correct way or syntax to add an attachment viaNew-TrelloCard
?My guess is this has something to do with the encoding as
Add-TrelloCardAttachment
works fine with .txt but fails with PDFUpdate:
I figured it out doing the API call direct. 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.The text was updated successfully, but these errors were encountered: