True URL for Download Links from standard file uploader

I know it might be easy , but i cannot figure it ou, so your help and patience with someone new to Concrete5 is appreciated. How does one go about changing the URL structure of links for items uploaded from the file manager block? Basically I wanted to know how when a file is uploaded in the backend can one change the links to by default? I am using a third party script for tracking that does not work unless the exact file type is in the URL.

View Replies: View Best Answer
Mnkras replied on at Permalink Reply
they best you will be able to do is get a url like
adrianspeyer replied on at Permalink Reply
Yes that's perfect, but how do I do that? Can you advise which file(s) I need to modify? :)
adrianspeyer replied on at Permalink Reply
I found that I may be able to use $fileVersion->getURL() instead of $fileVersion->getDownloadURL(), but where would I make this change?
adrianspeyer replied on at Permalink Best Answer Reply
Finally got the answer, for those looking for it. To help those in the future I decided to post it:

What you need to do is copy view.php of the pathtoyourconcrete/concrete/blocks/file
to your root concrete and modify the lines commented out:

$fo = $this->controller->getFileObject();?>
<a href="<?php echo $fo->getRelativePath()?>"><?php echo  stripslashes($controller->getLinkText()) ?></a>

Works like a charm!