Problem/Motivation
An Italian local authority publishes p7m digitally signed files on its website. All these files have the original not-yet-signed file extension as a courtesy in the name and then the .p7m extension appended, eg.: mysignedfile.pdf.p7m
On upload they are renamed with a token replacement pattern in the filefied paths / filename setting, but the ".pdf" portion is obviously deleted: my_renamed_signed_file.p7m
Is there a way/setting/hook to rename them keeping the .pdf portion of the name and save as my_renamed_signed_file.pdf.p7m?
It's clear this doesn't affect the integrity of the published signed files, but the owner of the website asked for it.
The file field is multiple and can accept other extensions than p7m, so I cannot just add the fixed ".pdf" string on the filename replacement scheme for every uploaded file.
Thanks for your attention
Issue fork filefield_paths-3476482
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
cheope commentedComment #3
volegerFile extension detection during token generation needs to be expanded.
I prefer to use a separate token definition to avoid breaking existing file extension token behavior.