I'm not sure this is possible. The default property editors that are shipped with Umbraco doesnt hold the media object as the model.value, but rather the Id of the media item. This means that it's only holding an int, and if you iterate over alle properties on a document type, you wont know what is referencing.
You could of course look for all the property-values with an int and check their property editor, and check if it is a media picker. But you run into a problem if you use custom editors (like a custom slider or something) where you can't be sure if its referencing a media object.
At least that is my understanding of it. I could be wrong.
To the best of my knowledge you are right. I managed to write a little tool that locates these using the method you described, As you mentioned it's hard going as there are custom types, archetypes you have to handle
Managing Media Items that have been deleted
I'm looking for recommendations on the best way to manage deleted media.
I'm looking to locate
I'm not sure this is possible. The default property editors that are shipped with Umbraco doesnt hold the media object as the model.value, but rather the Id of the media item. This means that it's only holding an int, and if you iterate over alle properties on a document type, you wont know what is referencing.
You could of course look for all the property-values with an int and check their property editor, and check if it is a media picker. But you run into a problem if you use custom editors (like a custom slider or something) where you can't be sure if its referencing a media object.
At least that is my understanding of it. I could be wrong.
Hi Dennis,
To the best of my knowledge you are right. I managed to write a little tool that locates these using the method you described, As you mentioned it's hard going as there are custom types, archetypes you have to handle
is working on a reply...