First off, thanks for the update. We've just been getting into this module recently at work and really like the ease of use.

I'm overriding the form element and then applying my own theme function for it. The JavaScript that is included in the module is also being overridden but it's mostly the same minus the custom mapping to the events as I wasn't able to get the #event_callbacks to use mine.. But by doing this I believe I've missed the portion where plupload tells the Form API about the files that should be in the $form_state.

Any examples of how to map to custom event callbacks and retain form_state values for those files would be greatly appreciated.

Comments

illmatix’s picture

Category: Feature request » Support request
illmatix’s picture

even better would be a process to allow previews of upload images like the drupal managed field module provides.

slashrsm’s picture

There is an example in README.txt, that shows how to use event callbacks (http://drupalcode.org/project/plupload.git/blob/refs/heads/7.x-1.x:/READ...). #event_callback must be an array with event names as keys and JS callback function names as values. It is proven to work and it supports all events that are supported by Plupload itself.

In case you find any bugs in the implementation I strongly encourage you to submit a patch to fix it instead of using your custom implementation.

iseeaflyingcrane’s picture

hello @slashrsm, the link you provided is broken. can you provide some example code how to use #event_callback