Try our conversational search powered by Generative AI!

CreatedContent event not working for content with same name

Vote:
 

Hi there, 

We are trying to take some actions when an image is uploaded. 

We are following this guide: https://www.david-tec.com/2017/02/using-tinypng-to-automatically-compress-images-in-episerver/

The idea is an initialization module that hooks into the CreatedContent event. 

It works perfectly for new images. 

But if the image has the same name (for example, we made some changes locally and want to re-upload with the same name) then the event is not triggering. 

Does anyone know a way around this? 

#183548
Oct 17, 2017 12:17
Vote:
 

CreatedContent is only triggered when created, so the first time indeed. Maybe the way Vafan did it is a better way for you? See the first comment on the article you mentioned.

#183555
Oct 17, 2017 14:10
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.