drupaldrupal-7drupal-files

Saving File to current content type Taxonomy term field


I have setup a custom filefield for one of my content types. In the configuration, it allows you to determine where you would like the files to be uploaded and gives you permission to use tokens. I had set it up like so: "documents/[current-user:field-department]" which actually works well. However, this is not exactly the desired result I am aiming for. The token shown above lets you save the file in directory that is the same as the current users Department. However, I do not want to save it according to the user's information but instead by what is chosen in the Department select list which is also another field in the same form.

How do I go about doing this? I experimented with Custom Tokens but I am not sure if I am doing it correctly.

Thanks in advance!


Solution

  • I figured it out.

    This is possible using this module addition: https://drupal.org/project/filefield_paths

    It did exactly everything I required.