Fileupload (Filepond) custom preview

Can anyone nudge me in the right direction for this? (I'm not hoping for a solution, just a general "how I might go about this")..
So when you upload a png or jpg for example, FilePond gives you a preview of the image. But if I upload a PDF or word document, I want to show a custom icon (I have these already) of a file with the PDF logo on, etc. instead of just a block of green or grey.
I'm guessing this is custom javascript, but how do I access these properties in the context of Filament? And get Filament to understand how to render the Filepond file with the custom icon of my choosing?
(I hope that makes sense).
I'm open to SpatieMedia or other 3rd party solutions also, if that's more appropriate for this?

Also, when I hit cancel after saving an uploaded file, I get stuck in an infinite loop of it loading the same "edit" page.. Is that a bug? Or do I need a custom "exit" button?
Was this page helpful?