I'm trying to set up my Drupal website to host files (more specifically, PDFs) at clean URL's and have some download statistics about them. For example, I would like "test.pdf" to be available at "/publications/test.pdf". I read about all the file managers such as IMCE, but they do not seem to provide this feature. Therefore I'm now trying to set up a Publication content type with just a single field of type File, use the URL path settings to get the clean URL and use the Download Count module to provide me some download statistics. However, I cannot seem to have Drupal return the PDF in the file field when a user visits the URL of such a node. The closest I get is rendering a link to the file, using the display settings of the file field.

Is this the way to go for what I want to achieve? And if so, how can I provide the contents of a file field at the URL of the node containing that field?

Thanks in advance.

2 Answers 2


Its not a good idea to provide contents of file field at node URL.

Instead use File Aliases module which will let you use node properties in the resulting file url.

The File Aliases module allows you to use token customizable aliases for your uploaded files, giving you the ability to keep your file system organized as per usual while providing clean looking paths (i.e., no more '/sites/default/files/').

  • Great, this is exactly what I was looking for.
    – DuXati
    Feb 5, 2014 at 20:52

The answer by Gokul N K is the way to go. However, some refinements to save those looking to use this module some time:

  • The current version (7.x-1.0-beta1) has some bugs. These have been fixed by a great patch. To apply this patch though, you need version 7.x-1.x-dev dated 2011-Nov-15. This is not the development version with the same name, so fetch the version from november 2011 using the repository viewer.

  • Then, to use the module: construct a content type, add a File field and look into the settings of that field. Took me forever to find out :)


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.