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
Hi.
Iam facing some problems catching any MediaType event. I need to do a import/sync from another media library (Razuna) if a media folder is saved.
protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext) { Document.BeforePublish += Document_BeforePublish; umbraco.cms.businesslogic.media.MediaType.BeforeSave += MediaType_BeforeSave; } private void MediaType_BeforeSave(umbraco.cms.businesslogic.media.MediaType sender, SaveEventArgs e) { HttpContext.Current.Response.Write(sender.Alias); /* DONT WORK */ } private void Document_BeforePublish(Document sender, PublishEventArgs e) { HttpContext.Current.Response.Write(sender.ContentType); /* WORKS FINE */ }
Can anyone help me out, iam using 6.1.6Best regardsJacob
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.
Continue discussion
MediaType.BeforeSave event, how to subscribe
Hi.
Iam facing some problems catching any MediaType event. I need to do a import/sync from another media library (Razuna) if a media folder is saved.
Can anyone help me out, iam using 6.1.6
Best regards
Jacob
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.