More than just images?

mp3's, flv's and swf's: http://drupal.org/node/108768#comment-177459

Comments

kkaefer’s picture

This is an awesome idea! A way this could be done is by not hacking it into the module directly, but by providing a hook for other modules (flashembed for example in this case). The other module can then decide whether it wants to show a preview and generate the code for it. The hook could simply be named hook_upload_preview(&$node, $file). The function then returns a forms array that is merged into the upload files display form.

sime’s picture

Yes, a hook would be sweet. The hack was just a little proof of concept.

For the job I'm doing I need to run some transformations over unviewable filetypes (eg. wav) and convert them to Flash viewable types (eg mp3). What event are you responding to when you get the image preview to generate after the AJAX uploads?

kkaefer’s picture

Status: Active » Fixed

hook_upload_preview() is now implemented in the latest development version: http://drupal.org/node/109067. Information on the hook usage is available in the README.txt.

Anonymous’s picture

Status: Fixed » Closed (fixed)