Closed (fixed)
Project:
Upload previews
Version:
5.x-1.1
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
12 Jan 2007 at 07:26 UTC
Updated:
5 Feb 2007 at 15:46 UTC
More than just images?
mp3's, flv's and swf's: http://drupal.org/node/108768#comment-177459
Comments
Comment #1
kkaefer commentedThis 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.Comment #2
simeYes, 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?
Comment #3
kkaefer commentedhook_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.
Comment #4
(not verified) commented