To elaborate, the template would probably have a structure like this:
template:file
[[Media:{{{1|}}}.{{{2|}}}|{{{3|}}}]]<!--
-->[[File:{{{2|}}} icon.png|link=File:{{{1|}}}.{{{2|}}}]]
The go ahead and load an icon image for each file type you plan on using. (If the image isn't icon-sized, you'll want to add a width modifier in there as well.) With this template, {{file|MyFileName|pdf|This is my PDF file}}
should generate exactly the output you describe: a direct link to MyFileName.pdf
called "This is my PDF file", followed by an embedded image File:Pdf icon.png
that is also a link to the description page for MyFileName.pdf
.