Umbraco V6 - How to use the MediaService.Saved event?
I'm trying to resize an image after it has been uploaded to the Media section, using the MediaService.Saved event. The EventHandler method for this event has a parameter Umbraco.Core.Events.SaveEventArgs<IMedia> - how do I find the uploaded media item within this collection of IMedia objects? I can loop through the SavedEntities (see below) but I'm not sure how to use it correctly?
public MyClass() { MediaService.Saved += SavedEventHandler; }
Umbraco V6 - How to use the MediaService.Saved event?
I'm trying to resize an image after it has been uploaded to the Media section, using the MediaService.Saved event. The EventHandler method for this event has a parameter Umbraco.Core.Events.SaveEventArgs<IMedia> - how do I find the uploaded media item within this collection of IMedia objects? I can loop through the SavedEntities (see below) but I'm not sure how to use it correctly?
I think that it's the same as this little discussion on Twitter: https://twitter.com/kipusoep/status/355674279817379841
"cause it might be a collection when using bulk save, so instead of having two signatures we opted for one."
So if you only have 1 upload just grab the first one.
Jeroen
is working on a reply...