Downloadable File Module

We encourage users to post events happening in the community to the community events group on https://www.drupal.org.
jerodfritz's picture

A lot of times our clients want to link a menu item directly to a file for download. Typically they have something like a pdf brochure that they want to be downloadable from a primary menu link or linked to from within another node.

In the past we would ftp the file to the server and just set the path to link directly to that file. Now we use a module called 'Downloadable File' that allows the content managers to create these downloadable files without requiring FTP access.

You can get the 'Downloadable File' module here http://features.centogram.com/node/4 .

-Jerod Fritz

http://www.centogram.com/projects

Comments

Upload? Filefield?

choster's picture

Thanks, but I don't understand the use case that necessitates a separate module.

The core Upload module or the CCK Filefield module already allow for creating a downloadable file as a node type, browsing and uploading said file through the browser without FTP access, and handling direct links to the files in the menu system and in Views. There is also http://drupal.org/project/file_aliases to allow token-based URL path aliases for the uploaded files.

Not Upload. Extends Filefield.

jerodfritz's picture

Upload module provides a means to attach uploaded content to existing nodes and is not the node_type itself. The upload module would not fit the use case to the one I outlined.

CCK Filefield is a required dependency of this module. This module does not in any way attempt to replace that functionality; only extend it.

The file_aliases module provides a means to change the path to files uploaded through filefield but still requires you to know that path when linking to the downloaded file.

By nature of the upload being a node rather than just a file the core optional module 'Path' provides all of the functionality file_aliases does without the need for additional tables in your database. The file being a node also allows for building upon all that drupal_get_path() provides : internal path filters, wysiwyg easy linking by linkit module, ability to search files using core search, etc...