Generated data URL displaying in new tab

Hello, I have a data set containing a blob with multiple file types associated. I have successfully been able to convert the blob to base64 and create a data URL which works well when the user highlights a row in the table. What I am trying to do is use either an Action button on the Table or even a clickable link that will open a new tab and display the file using the data url. Currently, If I create an HTML object and embed the data url it shows as a broken link but if I right click and select "open in a new tab" it displays perfectly regardless of file type (typically image file or PDF). I cannot figure out how to allow the user to just click a link or action button and open that data url in a new tab. What am I missing?

I would rather have them download or open the image in a new tab than have that image display on the App.

Thanks in advance.

Hey! As a quick thought, would rendering the cell as pure HTML help with your use case?

I believe I tried that unless I'm missing a feature. I utilized the html custom object. It would appear as a broken link but right clicking on it and opening image in a new tab produced the result.

Some progress this morning. I was able to modify the table column as a link which generated the link as data:application/pdf;base64,. When you click on it it presents two options. Open Link or Copy Link... Open Link just opens to a blank tab. Clicking on copy link and then pasting it into the browser works. Really not much different than before. What am I not getting here?

Hmm, thank you for sharing your update here! Would you mind sharing an example URL with me? If you don't want it on the public forums, feel free to DM me :slight_smile:

I went another direction and it works like a charm!

I utilized utils.downloadFile({base64Binary: BASE64_STRING} , fileName, fileType) in a JS Query and now call that using the action button in the table and it downloads the file PERFECTLY.


1 Like

Woohoo! So happy to hear it, and thank you for posting your solution here for others to use :raised_hands: