Forum Discussion
Hey Malcolm,
You can use the records upsert API to upload attachments:
https://developer.quickbase.com/operation/upsert
This page about file types shows that the attachment file data needs to be Base64 encoded:
https://developer.quickbase.com/fieldInfo
So for you in Pipelines, you could do this:
{
"value": {
"fileName": "report.pdf",
"data": "{{a.content | base64_encode}}"
}
}
Hope that helps!
------------------------------
Doug Henning
------------------------------
Doug -- thank you for continuing to work this very much appreciated. I've engaged QB Support too .. I think we're an inch from the finish line, but stuck at the binary encoding part. The jinja filter | base64_encode can only handle string, but the image mime-type encoding (I think I'm saying that right) has all kinds of characters outside of the 128-ascii set expected.
Annoying because the source image manipulation service API won't return a url I can just download the file from, and annoying because QB doesn't accept the result it without me finding another API to do the conversion step. I can see all kinds of local server-side solutions in javascript etc, but nothing I can fire off in pipelines.
If I come to a solution, I'll post here -- and thank you!
M
------------------------------
Malcolm McDonald
------------------------------