In 4.x I used to access additional data about Pages image upload fields like this:
{{if $formValue}} <ul> {{foreach $value as $manual}} {{$file = \IPS\File::get('cms_Records', (string) $manual);}} <li> <a href="{$file->url}">{$file->originalFilename}</a> </li> {{endforeach}} </ul> {{endif}}
In the current 5.x beta, the object now has some strange values combining paths and html code, like:
file->container: "<img src="https://website.com/uploads/monthly_2023_08"
file->url: "https://website.com/uploads/ <img src="https://website.com/uploads/monthly_2023_08/01frontpage.jpg.a5db82a07844b01fbfdb04340d43acd9.jpg" class="ipsImage" data-ipsLightbox>"
Not sure what is going on there but might be worth a look.
Recommended Comments