How to access private files in Drupal
Have you ever found it difficult to access a private file within drupal, then read on. Below are the steps I followed to create and access the private file.
- In file system configuration page (/admin/config/media/file-system), I defined private files path to be 'sites/default/files/private'.
- Downloaded and enabled the module Private Files Download Permission.
- In drupal permission setting page (admin/people/permissions), gave the permission 'Bypass Private files download permission' to the user role who should be able to access the private files.
Now I'm able to access the private file using the URL '/system/files/my-file-name'.
Hope this helps. If you need any further assistance, please get in touch with us.