How to get file links on a page to be the file's URL, not "index.php/download_file/view/ ... "?

Permalink
I want the ability for correctly-configured browsers to decide how to handle files such as PDFs (so that they'll display there or in new windows, etc.)

 
deckeda replied on at Permalink Reply
Feel free to pick an answer. Don't be shy.

a) I don't understand your issue.
b) I sort of understand the issue.
c) I'm not having this issue, PDF links open right up in the browser as they should; it must just be your problem, even though you're not having this issue anywhere else but on your C5 site.
Tony replied on at Permalink Reply
Tony
if your working with the file version object, use $fileVersion->getURL() instead of $fileVersion->getDownloadURL().

If you just copying and pasting the link, then get it from the image properties, rather than clicking the 'view' option.
deckeda replied on at Permalink Reply
I'm using the TinyMCE editor to add regular content to a page, like any normal user hopefully would.

Are you hinting that a file needs to be tweaked somewhere first, so that TinyMCE picks up the kind of link I want?
Tony replied on at Permalink Reply
Tony
so yeah, find the file in the dashboard file manager, then click on it and select "properties", then grab the image URL from there.

Alternatively, use the File Details block:
http://inneroptics.net/concrete5/file-image-details/...
deckeda replied on at Permalink Reply
I was able to get it to work properly by pasting the actual URL, and was happier to see that using a relative URL (beginning with the /files directory) means it won't break (I hope) once I move my site. It's a clunky way to have to edit, and having files nested in several directories with seemingly random numerical names suggest this isn't the intended way to link to files in C5.

Your File Details block description doesn't appear to address the issue I've raised and I can't afford to spend $15 + time to find out how or if it does.

I took a look through the Documentation but didn't see this basic file behavior mentioned, even though it's quite common for sites to NOT force a download for linked files by default.

I appreciate your responses here, Tony! Is there anything more you can explain about $fileVersion->getURL() vs. $fileVersion->getDownloadURL() It sounds as if there is a default setting somewhere could be set somewhere, yes?
Tony replied on at Permalink Best Answer Reply
Tony
yes, the file/image details block gives you the option to open (what you're looking for) or download the file.

the $fileVersion stuff I pasted is only important if you're adding those links programatically, so it sounds like that doesn't apply in your case.
deckeda replied on at Permalink Reply
OK, thanks much.