I have a data set which contains a column for URL's for file a user has upload and a second column that contains the type of file that has been uploaded. I have created a beast mode that displays a thumbnail of any uploads that are images. I now want to display an icon for items that are not images but cannot get the icons to display.
This is the beast mode that I have been using to display the thumbnails:
CONCAT('<a href="',`stepAnswerUploadUrl`,'" target="_blank">',
'<img src="',`stepAnswerUploadUrl`,'" height="20px" alt="Click for image"/>',
'</a>')
As a test I attempted to load a PDF icon for all non-image file types, using the following beast mode. The thumbnail worked for images but all other types were blank.
CASE
WHEN stepAnswerUploadType
= 'IMAGE' THEN
CONCAT('<a href="',`stepAnswerUploadUrl`,'" target="_blank">',
'<img src="',`stepAnswerUploadUrl`,'" height="20px" alt="Click for image"/>',
'</a>')
ELSE
CONCAT('<a href="',`stepAnswerUploadUrl`,'" target="_blank">',
'<i class="fas fa-file-pdf"></i>',
'</a>')
END
Any assistance would be greatly appreciated