Media.AfterSave not firing when using "Create New" in Media Picker
I have written a handler for the Media.AfterSave event which resizes images to a certain max size when they are uploaded. This works just fine when uploading using the Media section, but not when using the "Create New" function in the advanced media picker. Media.AfterNew is fired here, but not Media.AfterSave. And in Media.AfterNew you of course cannot resize the image (since it hasn't been uploaded yet).
So how do I go about getting a consistent resizing behaviour no matter how the image is uploaded. An option is of course to use a scheduled task, but that seems to be way too complicated for such a simple task. In my opinion, I just think the media picker should fire all the events correctly - why shouldn't it?
Media.AfterSave not firing when using "Create New" in Media Picker
I have written a handler for the Media.AfterSave event which resizes images to a certain max size when they are uploaded. This works just fine when uploading using the Media section, but not when using the "Create New" function in the advanced media picker. Media.AfterNew is fired here, but not Media.AfterSave. And in Media.AfterNew you of course cannot resize the image (since it hasn't been uploaded yet).
So how do I go about getting a consistent resizing behaviour no matter how the image is uploaded. An option is of course to use a scheduled task, but that seems to be way too complicated for such a simple task. In my opinion, I just think the media picker should fire all the events correctly - why shouldn't it?
You could use the Digibiz Advanced Media Picker. It also has a create option and it will fire the before and after save event after creating.
Jeroen
is working on a reply...