The Attachment Links module provides permanent links to files attached to a node. A single, easy-to-remember URL can be used to retrieve the preferred (canonical) or newest version of a file regardless of how many versions of that file have been attached to a node.
Typically, users will want to create a "File" content type and enable the Attachment Links module for that content type. Each "File" node should refer to a single file: "Handbook," "Company logo," "Team roster," etc. Though each node could contain multiple versions of the file, Attachment Link provides permanent link to access the preferred or newest versions.
How to use Attachment Links
Say you want to let users download your organization's handbook by attaching it to a node. If you upload a file with the same name (and have node revisions enabled), Drupal will rename the new file by appending a number:
- Handbook_1.doc
- Handbook_0.doc
- Handbook.doc
If you wanted to avoid this problem, you could upload files with unique names (version numbers, dates, etc.):
- Handbook 2010-01-02.doc
- Handbook 2009-11-02.doc
- Handbook 2009-10-15.doc
In both cases, the most recent handbook has a different file name. If many nodes on your site link directly to the handbook, you would have to change each link to reflect the new file name.
The Attachment Links module solves this problem by providing two permanent links:
- Preferred file (the top-most file listed in the interface):
/node/NID/attachment
- Newest file (the file most recently uploaded):
/node/NID/attachment/newest
You can now create a "Handbook" node and upload as many revisions of the handbook as you like without having to change all incoming links.
Installation and dependencies
- Drupal 7: Requires the core File, Field, and File SQL storage modules. Because there can be multiple file fields in a content type, you'll need to choose one when enabling Attachment Links for that content type. See README.txt for more information.
- Drupal 6: Requires the core Upload module to attach files to nodes.
Similar modules
Others have tried to conquer file management confusion using different techniques. Take a look and evaluate which module will work best for you.
Credits
Development of this module is sponsored by Yale University and Four Kitchens.
Project information
- Seeking new maintainer
The current maintainers are looking for new people to take ownership. - Maintenance fixes only
Considered feature-complete by its maintainers. - Module categories: Content Editing Experience, Content Display, Site Structure
- 312 sites report using this module
- Created by Todd Nienkerk on , updated
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.
Releases
Development version: 7.x-1.x-dev updated 17 Nov 2013 at 23:28 UTC