Thanks to #1201924: Widget does not respect settings in file_field_instance_settings_form (uri scheme, directory, extensions, file size), file and image fields now respect the file directory setting.

However, when tokens are used in the file directory, it just creates the directory as the token, and not the rendered value.

For example, my files are now stored in a directory called [current-user/name]

Basically, tokens aren't being rendered.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Shawn DeArmond’s picture

Status: Active » Needs review
FileSize
629 bytes

This fixes it.

Dave Reid’s picture

Status: Needs review » Needs work

token_replace() is in core so we don't need a condition on module_exists('token')

Shawn DeArmond’s picture

Status: Needs work » Needs review
FileSize
570 bytes

Right. Forgot that it was just the token ui that's its own module. Here's the updated patch.

ParisLiakos’s picture

Status: Needs review » Reviewed & tested by the community

Applied it and works!
thanks

Dave Reid’s picture

Status: Reviewed & tested by the community » Fixed
aaron’s picture

Status: Fixed » Reviewed & tested by the community

works perfectly!

ParisLiakos’s picture

Status: Reviewed & tested by the community » Fixed

commited in #5

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.