I want to store PDF and Image files in Drupal. By default Drupal seems to store binary/uploaded files into the filesystem. I want to to be able to store files so that - I can have workflows, metadata, IP information and URL aliases?

Update, am still stuck at how to create URL aliases for files on the file system. Drupal only seems to allow creating URL aliases to node content.

+2  A: 

The simplest solution for Drupal is to use the Upload module, which is in core. The upload module allows you attach files to nodes. As you note, they are stored in the filesystem.

If you want to get more complex, you can build your own content types through the web interface by using the CCK family of modules (such as the filefield module or the imagefield module). Your files are still stored on the filesystem.

You could use CCK to create the metadata field you want.

You could use the workflow or rules modules to implement workflow.

IP information is recorded automatically by Drupal's logging module (either the database logging module, which logs to the database, or the syslog module, which logs to syslog).

URL aliases for nodes are available in core Drupal by enabling the path module (or download the pathauto module for automatic creation of aliases).


I tried Drupal's Upload module, FileField as well as uploading files using FCKEditor - I prefer the last one - it is closer to my specific scenario.


Creating an alias to the file will likely require some custom code.

It's not possible to simply create an alias using the Administer > Site building > URL aliases screen. I tried inserting a record with

insert into url_alias (src, dst) values ('sites/default/files/ChipotleArt.JPG', 'here-is-the-file.jpg');

That still didn't work. So, you will really likely need to write some custom code.


related questions