I’m receiving a PDF attachment as a base64 encoded string to a service. I need to save this to the filesystem. I’m using the following services:
base64Decode → bytesToString – writeToFile
The file is saved but the pdf document is empty when I open it. I’m able to email the document to myself by using:
base64Decode → smtp and setting the content of the attachment equal to the result of the base64Decode
I know the pdf document is valid because I’m able to read it from my email attachment.
Is there something I’m missing to get this file to save correctly to the filesystem?