Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comment | File | Size | Author |
---|---|---|---|
#3 | tokens-in-file-directory-1290110-3.patch | 570 bytes | Shawn DeArmond |
#1 | tokens-in-file-directory-1290110-1.patch | 629 bytes | Shawn DeArmond |
Comments
Comment #1
Shawn DeArmond CreditAttribution: Shawn DeArmond commentedThis fixes it.
Comment #2
Dave Reidtoken_replace() is in core so we don't need a condition on module_exists('token')
Comment #3
Shawn DeArmond CreditAttribution: Shawn DeArmond commentedRight. Forgot that it was just the token ui that's its own module. Here's the updated patch.
Comment #4
ParisLiakos CreditAttribution: ParisLiakos commentedApplied it and works!
thanks
Comment #5
Dave ReidCommitted #3 to Git.
http://drupalcode.org/project/media.git/commit/789da01
http://drupalcode.org/project/media.git/commit/b5b94f6
Comment #6
aaron CreditAttribution: aaron commentedworks perfectly!
Comment #7
ParisLiakos CreditAttribution: ParisLiakos commentedcommited in #5