void MediaService_Saving(IMediaService sender, SaveEventArgs <IMedia> e) { try { if (Configuration.Settings.Enabled) { // We want to know if the media files are going to change. // To do this, store the state of all the IMedia nodes before they get changed _umbracoEventMediaData = new UmbracoEventMediaData(e.SavedEntities); } } catch { // Swallowing exceptions is bad, but we definitely do not want to disrupt the flow of saving media files to Umbraco, // otherwise you might not be able to save files anymore at all. } }
void MediaService_Saving(IMediaService sender, SaveEventArgs<IMedia> e) { try { if (Configuration.Settings.Enabled) // We want to know if the media files are going to change. // To do this, store the state of all the IMedia nodes before they get changed _umbracoEventMediaData = new UmbracoEventMediaData(e.SavedEntities); } catch { } }