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

Michelle’s picture

Version: 7.x-1.0-beta4 » 7.x-1.x-dev
Category: Bug report » Feature request

The 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.

Deciphered’s picture

Status: Active » Closed (works as designed)

If 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.