CHAPTER 13Working with Files

Drupal has the ability to upload and download files in a variety of ways. In this chapter, you'll learn about public and private files and how they're served, deal briefly with the handling of media files, and look at Drupal's file authentication hook.

How Drupal Serves Files

Drupal provides two mutually exclusive modes for managing file download security: public mode and private mode. In private mode, it is possible to check user permissions when a download is requested, and the download is denied if the user doesn't have proper access. In public mode, any user who can access a file's URL may download the file. This setting is applied on a site-wide basis rather than module by module or file by file, so the decision ...

Get Pro Drupal Development, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.