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.
Hi,
I configured an image field with the following filename pattern :
[file:ffp-name-only-original].front.[file:ffp-extension-original]
Problem occurs when I upload a file which use the pattern, example :
myfile.front.jpg.
The file is renamed myfile.front.front.jpg...
Is this behavior correct ? I would like to have the same filename if the pattern matches the requirements, but actually it's not the case, the file:ffp-name-only-original is used with the full name and the file is renamed... Anyone see a solution to test the pattern before apply it ?
Thanks in advance for any suggestion.
Comments
Comment #1
MichelleThe module renames your file to the pattern specified which is exactly what it's doing in your example. What you are wanting to do would be a new feature.
Comment #2
Deciphered CreditAttribution: Deciphered commentedIf the original file is 'myfile.front.jpg', then 'myfile.front' is the value of
[file:ffp-name-only-original]
and the result you are getting is exactly what you have asked for.You would need to use another token, which you can write yourself or potentially find a module that provides said token, that provides just up to the first fullstop, but the token you are using is doing exactly what it should do.