[Midas] file upload plugin
Michael Grauer
michael.grauer at kitware.com
Wed Nov 21 12:51:16 EST 2012
Hi Mona,
Whenever a file is uploaded, this callback line is fired in the
UploadComponent:
Zend_Registry::get('notifier')->callback('CALLBACK_CORE_UPLOAD_FILE',
array($item->toArray(), $itemRevisionDao->toArray()));
So if you register for this callback in your plugin, you can inspect the
item and itemrevision in your callback method.
I can't remember if you have implemented callbacks before in your module,
here is some documentation to get you started:
http://www.kitware.com/midaswiki/index.php/Documentation/Latest/Developer/Modules#Callback_framework
I see that according to the docs, callbacks should pass their params as a
keyed array, in this case the callback is just sending a list. I've opened
a bug for this.
http://public.kitware.com/MidasBT/view.php?id=886
Thanks,
Mike
On Tue, Nov 20, 2012 at 7:12 PM, Mona Wong <mona at sdsc.edu> wrote:
>
> Hi:
>
> I need to create a plugin that will be fired when a user uploads a
> file of a certain type. What's a good place for me to look to get started?
>
> I looked at
> http://www.kitware.com/midaswiki/index.php/Documentation/3.2.8/Developerbut didn't see anything that jumped out at me on how to do this...did I
> miss it? Is there another place to look or a module that does something
> similar which I can model after?
>
> thanks,
> Mona
>
>
> *********************************************
> Mona Wong
> Web & iPad Application Developer
> San Diego Supercomputer Center
>
> "Forgive everyone everything."
> -- Regina Brett
> *********************************************
>
>
>
>
> _______________________________________________
> Midas mailing list
> Midas at public.kitware.com
> http://public.kitware.com/cgi-bin/mailman/listinfo/midas
>
--
Thanks,
Michael Grauer
R & D Engineer
Kitware, Inc.
919 969 6990 x322
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/midas/attachments/20121121/32ad1f62/attachment-0001.html>
More information about the Midas
mailing list