Hi!
I'm using an Azure Logic App as middleware between a front-end task submission form and a Trello to-do board. Trello/Atlassian has built a few built-in actions that work great.
They're missing attaching files to cards. So, I figured I'd do it myself.
I have followed the Trello REST API documentation and am using a `multipart/form-data; boundary=----boundary` POST.
Here's the body of the POST:
------boundary
Content-Disposition: form-data; name="key"
<key string>
------boundary
Content-Disposition: form-data; name="token"
<token string>
------boundary
Content-Disposition: form-data; name="file"; filename="filename.pdf"
Content-Type: application/pdf
@{base64ToBinary(body('ActionToGetPDFAsBase64')?['$content'])}
------boundary
Content-Disposition: form-data; name="mimeType"
application/pdf
------boundary
Content-Disposition: form-data; name="name"
filename.pdf
------boundary--
When it gets submitted to Trello, it displays the attachment on the card, but the attachment itself doesn't work -- it just shows a blank PDF.
That would indicate there's something wrong with the binary that's sent to Trello?
Does anyone see anything I'm doing wrong?
I've tried changing the mimeType to application/octet-stream too, and get the same thing.
I've tried sending my localhost the POST request, and it comes correctly formatted -- which is why I'm asking after Trello knowledge.
Thanks!
Joe