Forum Discussion
Thanks Doug-- that does get me further -- I can now "see" the image binary in the pipeline's output - but still can't do much with it.
Intention is for the file to be uploaded as a file attachment .. but that pipeline only accepts a URL. I tried it anyways, and it didn't take the binary. I'm stuck feeling like buckets might be an approach (limited documentation but it talks about handling files?). Ideally I'm not setting up a box account or something as a temporary URL hosting.. seems like too many steps in the chain.
Any other thoughts?? Thanks again for your help!
M
------------------------------
Malcolm McDonald
------------------------------
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
------------------------------
- MalcolmMcDonald2 years agoQrew Cadet
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
------------------------------