Hi,

I've created a view to list some files which were attached to nodes.
Now at first I checked 'Link this field to its node' which returns the correct path systems/files/pathtofile/file.ext
But I couldn't influence the target of the anchor so I thought I'd use 'Rewrite the output of this field';

<a href="/[filepath]" target="_blank" title="([title] - [filesize] - [timestamp])">[description]</a>

The [filepath] pattern returned is linking to sites/all/default/files/pathtofile/file.ext :(
Is this a known bug and are there workarounds other then using a .tpl?

Cheers

CommentFileSizeAuthor
#4 views-fileurl.patch1.32 KBdawehner
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Bartezz’s picture

Version: 6.x-3.x-dev » 6.x-2.6

Oops... shouldn't use scroll when the focus is on select boxes :)
Setting to correct version.

flokli’s picture

also the same when selecting "Link this field to download the file" in Upload:Description.

This is very annoying; i have a "Downloads" page which searches through all news with an attachment.
The view will always display the absolute Link to the file, so download counting modules won't work!

Any way to change it?

Bartezz’s picture

Priority: Normal » Critical

Haven't found a solution, sorry.
Still waiting to hear from a maintainer :(

Maybe changing priority helps?

Cheers

dawehner’s picture

Category: bug » feature
Priority: Critical » Normal
Status: Active » Needs review
FileSize
1.32 KB

This is a normal feature request.

There is a big difference between

* Filepath
* Fileurl

flokli’s picture

thanks for your patch!
I applied it, but where can I now select "The url of the attached file."?

And the "Link this field to download the file" checkbox should always use the url, not the path of the file...

dawehner’s picture

This is another token.

The link field should work

merlinofchaos’s picture

Version: 6.x-2.6 » 7.x-3.x-dev
Status: Needs review » Patch (to be ported)

dereine's solution is sensible. Committed to 6.x branches; needs port to 7.x

dawehner’s picture

Status: Patch (to be ported) » Fixed

And ported.

Bartezz’s picture

Thanx all and have a good weekend!

Cheers

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.