6

With Drupal 7, I created a content type with a field to attach files. I am using private file uploads. When viewing the node, the list of attached files is visible to every user, including anonymous users.

I want that logged-in users are able to click on a file link to download the files attached to nodes; anonymous users should be able to see the list of files, but clicking on a file link should show them the login page, forcing them to log in, and them download the attached files.

How can I achieve this?

6

You can try Private Files download permission module for drupal 7 and you can set permission to download to certain users.

0

You can try setting 'View Published Content' permission only to authenticated users. The body field of the node can be still made available if required, but the file will not be visible to anonymous users

  • Viewing a link is just one part of the problem, you have to address passing the link around. – Artur Apr 17 '13 at 14:58

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy