Using Node with MS SQL backend.
I have a pdf document that is a Base64 string and I am trying to display it. I have an object tag and the Base65 coming from an api source. The error that I get is saying “Failed to Load PDF”. It takes several seconds to actually load the api source. After the data is loaded, the error message goes away but the pdf never renders. Is it giving me that error because the object is initializing before the data is loaded? If so, how do I delay the object initialization?
Here is my object code and my api action.
<dmx-api-datasource id="apiGetPDF" is="dmx-fetch" url="https://xxxxxxxxx/integration/documentview" dmx-param:appointmentid="'C2DD4B06-46F0-4A56-87EA-C0059EA8D852'" dmx-param:apikey="'35b39ea0-0cd9-4f78-b090-6b5527010bfb'"></dmx-api-datasource>
And the object:
<object>
<embed id="pdfID" type="text/html" width="1200" height="600" dmx-bind:src="'data:application/pdf;base64,' +apiGetPDF.data.baseFile" />
</object>