Search code examples
flashdrupaldrupal-6wysiwyginline

Drupal 6: Inline swf/flv upload in content


Working on a site where I want site admins to be able to upload swf and/or flv files inline in a content's body together with text, images, etc. I'm currently using the WYSIWYG module (with CKEditor).

Basically, what I need is something like http://drupal.org/project/wysiwyg_imageupload, but for flash content. I've looked for something similar but without success.

Thanks!


Solution

  • SWFUpload (http://drupal.org/project/swfupload) seems like just the thing for you. But, it's in beta and has a known security flaw, so use at your own risk

    You could also use a combination of the built-in upload module and SWFTools, if you want something more stable. Just upload the SWF or FLV file using upload, and copy-paste the URL of the uploaded file into the SWFTools text filter.

    That is, you'd upload foo.flv, and upload would show http://www.yoursite.com/sites/default/files/foo.flv as the file's URL. Then you would add <swf file="http://www.yoursite.com/sites/default/files/foo.flv"> into the body of the node.

    If you're comfortable editing node.tpl.php and are up for something even fancier, you could add a CCK filefield to the content type, and call SWFTools directly from the template file based on whatever is in the filefield.