Hi. I’m trying to recieve a PDF-file from a web-request and them insert it into a file-object in Appfarm using the custom file content choice:
I have tested the base64-string in this converter: Base64 to File | Base64 Decode | Base64 Converter | Base64
and it gives me the right PDF output. I get no error when making the file, however the built in PDF-dispay component says “Can’t load data”. I think there might be a conversion issue - so I need the right conversion, but have not yet been able to find one that works.
The PDF-file in Base64-format: (“JVBERi0xLjUKJVBERi0xLjUK…”).
Can send the whole string if needed.
The issue is that in Services, the atob/btoa are hardcoded to utf8. Also, we have some idications that there are some similar encoding issues when using “Create file object” in Services from binary data.
Will get back to you when it has been analyzed a bit further in order to give a more precise feedback (incl estimate of completion)
Hi,
Is there any updates on this? I’m having issues with decoding the base64 pdf. When opening the downloaded file I get an error, even though the base64 string is correct.
Just been having a discussion with the Engineering team. This issue is part of a bigger intitiative on binary files and convertions. The work spans several aspects, and most of it hopefully to be completed Q3. Until then, alternative methods need to be used (via third parties, or maybe it may be solved with pure javascript in services as well)