How do I display the file format?

I’m building a marketplace for digital files.

Is there a way to display the file format so that all users can see the various files uploaded by users?

When the file on the left is uploaded, I want it to look like the one on the right
I want it to appear before links and downloads.

example.txt → (.txt) or (txt)
bubble.mp3 → (.mp3) or (mp3)
sample.pdf → (.pdf) or (pdf)

Do you have a solution?

yeah you need to use “:truncated from end to”

Check this example:

1 Like

Thank you!
You’ve been very helpful.

1 Like

This topic was automatically closed after 70 days. New replies are no longer allowed.