Try our conversational search powered by Generative AI!

Media Upload Event - Check duplicate file across entire Media tree

Vote:
 

I would like to check the file name, and see if it already exists elsewhere in the media tree? (Requirement from our client)

It will currently prompt that file is there is same folder, but I need to extend this to entire tree.

What event should I subscribe too for catch when a new media item is uploaded?
I am hoping I can hook into that event, then scan Media tree, and see if it's a duplicate (I'm aware there will probably be a overhead here, and will feed this back to client) 

 

Thanks
Danny

 

#81485
Feb 18, 2014 11:59
Vote:
 

I am not sure about the event but you can use EPiServer Search API to find for the file name. You can refer here for more information:

http://world.episerver.com/Blogs/Eric-Herlitz/Dates/2013/1/Using-EPiServer-Search-in-EPiServer-7-MVC/

/Q

#81517
Feb 18, 2014 15:24
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.