Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Is there a way of determening if a media item (in this case a pdf) is used by any media picker in the content?
I'm searching and presenting the content of pdf's but the indexer is using "IndexParentId" which means that it will index all of the pdf's of that parent node, in this case a folder.
Now the problem is that the user are able to attach pdf's in the content with the media picker. If the user then later decides to remove a particular attached pdf from one of the content nodes the pdf is still indexed but not really relevant for the search result. In order for the pdf not to be indexed the user then have to delete the file in order to not show up in the search result.
Is there a way of detecting if a media item is used by any content node?
There is a package available for this called Nexu: https://our.umbraco.com/packages/backoffice-extensions/nexu/
If you need to detect it yourself in code, you can look in the sourcecode how its done:
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted