Hello,

I have created a view with several files. These files are ordered in several sub-repertories in my private directory. Then, with this module the access of the files depending of the roles.

In my view I get links to download the files (formatter download on the field file). The structure of the link's url is: http://www.mysite.com/file/100/download?token=RT84c2M. But, only the user1 can view this link and download the file. The other users (with the good roles) can't access of the files.

If I tries to download the same file by the direct url of the library (content/files...), I haven't problem. The user with the good roles can download the files. The structure of the link is different: /system/files/documents-restricted/my-document.pdf

Is it normal? Is there a solution to use the link generated by the view? Is there a risk to use the link of the library?

Thanks for your help.

Comments

kumkum29 created an issue. See original summary.

kumkum29’s picture

Title: Trouble with download link in views » Troubles with the download link in views
zanonmark’s picture

Assigned: Unassigned » zanonmark
Status: Active » Closed (works as designed)

Just configure the view the following way:
* Configure field: Content: YOUR_FIELD_NAME
* Formatter: url to file
* Rewrite results: Output this field as a link
** Link path: [field_YOUR_FIELD_NAME]

Marco

eyose’s picture

I have followed the above steps Marco but it doesn't work for me at all. Even I didn't see anything inside views.