However in many scenarios, i use pickers to select data, where it is often folders that are being selected. So for example the in the stock photo below, where the parent folder is selected in a media picker.
I currently have created my own extension, where the user can track unused medias, and clean up any unused medias they dont want to keep. My question is: Is there any built-in way, or do any of you know an easy way to track the actual unused medias?
Currently i just visit items parents until i reach the root node, but it is a very slow process with 10’s of thousands files.
If memory serves each propertyEditor implements it’s own referenced items..
eg mediapicker3…
So perhaps you can override that to check if a folder and then enumerate?
But my understanding is also that this is tracked by a relation umbMedia in the umbracoRelation table… and is reliant on the property editor implementing the relationship creation/deletion so could or could not be present in custom property editors.
Maybe your own extension is using the relationship service already and enumerating any folders it finds, so apologies if this is telling you how to suck eggs