Hey there,
I will work out the scenario where you have a document available within your application (so no external reference)
Hi,
if your file is uploaded to your application (and the user has entity access), it is possibel to download it directly using the file id.
<applicationurl>/file?fileID=<fileID>
if you want to make this dynamic with several changing files, eg. as part of an email, you can get the applicationurl as string from a java action from the community commons module. the fileID is an attribute of your file entity.