Summary
Add original filename and replace extension and underlines for images.
{{data.fileMetadata.fileName
| replace: data.imageMetadata.fileExtension , ""
| replace: "_" , " "
| replace: "-" , " "
}}
CODE
Access File Name
Use Case
By using the original filename a field can already show a value, so the customer can only update the text. The filename may contain underlines which will be considered when searching and led to wrong search results.
To avoid wrong search results the underlines shall be replaced. Use any values from a field (accessed via fieldpath) and replace underlines and dashes with spaces and file extension with nothing (remove file extension).
{{data.fileMetadata.fileName
| replace: data.imageMetadata.fileExtension , ""
| replace: "_" , " "
| replace: "-" , " "
}}
JSON