Save Image and Image Upload template step doing something odd

Wappler 4.2.0
Mac OS X M1 and Mac Intel Big Sur 11.6.1

When uploading a batch of files with various names and extensions like
image1.JPG
image2.JPEG
image3.jpg
image4.jpeg

I wanted to use the Template on either Upload or Save Image steps to alter the extension part to always be lowercase and always prefer jpg over jpeg
EDIT: I was using AUTO for the image type on the Save Image step.

I added to the Template `{name}{ext.lowercase().replace(‘jpeg’, ‘jpg’)} and this was the unexpected result.

The other little thing was if using the Template on the Save Image step and trying to add the image name to my database, there is no bindings available on the Save Image step, so to add the renamed image in my database I had to manually add {{saveImageStepName.split('/').last(1)}}.

Community Page
Last updated: