How to download uploaded resources

There’s a field type – resources – in document type editor, and after creating a document and upload some resources to the field, how can I download these resources using freemarker?

I tried the following code, but it seems can only get the path of the resources.

<@hst.link var=“fileURL” hippobean=document.file/>
<a href="${fileURL}">

${file.filename}</a>

What else do you need besides path?

The url losts filename info. When right clicking the link and then saving the file, the name of the saved file is without any extension (.pdf. jpg and so on). The user may not know what the document is.