179 Posts
carin
7 years ago
1
Topic

I need to change the file extension on beforeStore to lowercase since the SEBLOD standard upload image field cannot do that. The field in question is an image upload in a fieldX so there are multiple files to rename. I guess the code would look something like this in some sort of loop:

$fields['image_upload_?']->value = strtolower($fields['image_upload_?']->value);

Does anyone know how to do that?

Get a Book for SEBLOD
4229 Posts
Kadministrator
7 years ago
0
Level 1

Value of fieldX is stored in parent, not in child field. And you need to loop trough values property (note the trailing s). 

http://php.net/manual/en/control-structures.foreach.php

Get a VIP membership