Skip to main content
1 of 2
rooby
  • 14.7k
  • 1
  • 40
  • 82

With the private file system you cannot link direct to the file path because navigation of the private files directory is prohibited.

You have to link to drupal's private file handling url, which will then check that the current user has the correct permissions to view the private file and if so grants them access and gives them the file.

To utilise this you need to use drupal's system/files path.

So if your private files directory is files-private and you have a file files-private/filename.txt you would link to /system/files/filename.txt and drupal will handle the rest.

rooby
  • 14.7k
  • 1
  • 40
  • 82