To make file access by permission in drupal 7, use 'private_files_download_permission' module. This module provide features to drupal developers to download files by specific roles.
For example:- In my requirement,there are multiple resume in a folder. I need to make it private so that no user can download any candidate's resume by hitting direct url in the browser.
To make it private following are the steps to follow:-
1) Go to admin/config/media/file-system and put sites/default/files/private in 'private file system path'.
2) Then go to your content type and edit field for which you want to make it private and change upload destination from 'public' to 'private'.
3) Now, download the module 'private_files_download_permission' and activate it. Then give permission to specific role who can download those files.
0 Comment(s)