It can be used as to generate url tocken because tocken overlooking adds a space at the beginning of the name

Here is the link path for the rewrite settings: sites/default/files/[field_name]
the resulting output: http://mysite.com/sites/default/files/ [field_name]

Comments

vacho’s picture

I tested and this problem occurs when rewrite output of a field as a link to view and is an attachment fields

vacho’s picture

I have stopped using the name of the file to replace the text of the url
What I have done is define the field of attachment as url to the file and use as is that in my other field tocken
All this simply by setting the view.

Dave Reid’s picture

Project: Token » Views (for Drupal 7)
Version: 7.x-1.4 » 7.x-3.x-dev
Component: Token Actions » Code
Category: bug » support

Your bug is with Views, which its own version of 'tokens' which are different from the core Token API which is what Token module deals with. Please confirm which version of Views you are currently using and update the ticket.

lantha’s picture

Vacho can you please describe the method you implemented? I am using "Url to file" but cannot output the file as a link to the pdf file that I want to link to. It just shows the rewritten text and not a link.

lantha’s picture

problem resolved. Thanks. The same "Url to file" method worked.

lucaspretti’s picture

Issue summary: View changes

Same here, setting the "Formatter" to "URL to file" when configuring the file field in views did the trick, maybe that option should be default.

thanks

MustangGB’s picture

Status: Active » Closed (outdated)