FilePathDirect behaviour in the File Uploader field...

Permalink Browser Info Environment
Hello again, Jordan.

How do you get your File Uploader field to open a file directly in the browser...the same as if it were a link in the WYSIWYG field with the FilePath changed to FilePathDirect?

I thank you again for your help.

James

Type: Discussion
Status: New
pkunzipula
View Replies:
jordanlev replied on at Permalink Reply
jordanlev
That's a default C5 behaviour. If you want a particular link to open inline, I think you need to edit the view.php file of the block *after* you've created it with Designer Content.
Edit that view.php file and find any lines like this:
<a href="<?php  echo View::url('/download_file', $field_1_file_fID, Page::getCurrentPage()->getCollectionID()); ?>" class="file-<?php  echo $field_1_file->getExtension(); ?>">

...and change this part:
View::url('/download_file', ...

to this:
View::url('/download_file/view_inline', ...

concrete5 Environment Information

Browser User-Agent String

Hide Post Content

This will replace the post content with the message: "Content has been removed by an Administrator"

Hide Content

Request Refund

You have not specified a license for this support ticket. You must have a valid license assigned to a support ticket to request a refund.