If I link to an attachment with [^filename] syntax, eg:
small.txt
Then the filename in the attachment link is prefixed with an internal JIRA attachment ID, eg. "25120_small.txt" for the link above. This link is different to that in the "attachments" section of the page.
JIRA should be serving the attachment with exactly the same filename as when uploaded.