Board Thread:Support Requests - Getting Technical/@comment-4003779-20131021150235/@comment-1158325-20131023231035

That's what that mediawiki page does, it adds the selected template to the file page when it is uploaded.