I am trying to set the upload directory for a file field to contain the content type (and node id) as part of the path.

The desired path for my public files field is publication_documents/pub/content_type/node_id_of_node_this_was_uploaded_to/filename

I have tokens installed, but it doesn't seem to offer me tokens related to the parent node in the upload directory setting:

error message

File directory

Slide 30 of This slideshow seems to indicate that it is possible, but how can I do it?

In case it matters, I'm using the media and file_entity modules.

1 Answer 1


File (Field) Paths module should help you. enter image description here

  • That seems like exactly what I need, but I still have one issue. Is there a token or a way to get the machine name of the content type instead of the Human Friendly version. My migration is already copying the files over using the machine names.
    – UltraBob
    Apr 12, 2016 at 6:38
  • nevermind, found it! [node:content-type:machine-name]
    – UltraBob
    Apr 12, 2016 at 6:41

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.