sfWidgetFormInputSWFUploadPlugin - 0.9.8

Plugin for decorating a file input widget with SWFUpload javascript.

You are currently browsing
the website for symfony 1

Visit the Symfony2 website

« Back to the Plugins Home


Forgot your password?
Create an account



advanced search
Information Readme Releases Changelog Contribute
Show source


sfWidgetFormInputSWFUploadPlugin decorates a file input widget with queued uploading capabilities, provided by SWFUpload (www.swfupload.org).

This plugin is now an required dependancy of sfFilebasePlugin. See at its sample project to see it in action.


Use the widget like an ordinary file upload widget and configure it by passing custom options to its options array.

In custom form you'd to probably manually include the widgets assets (javascripts and stylesheets). Do so by using $myform->getJavascripts() and $myform->getStylesheets().


<form method="post" enctype="multipart/form-data" accept-charset="utf-8">
  <?php foreach($form->getJavascripts() AS $javascript):?>
    <?php use_javascript($javascript)?>
  <?php endforeach?>
  <?php foreach($form->getStylesheets() AS $link => $media):?>
  <?php use_stylesheet($link)?>
  <?php endforeach?>
  <?php echo $form->render()?>

Feel free to override the css to fit your own applications look and feel.


(Install instructions taken from README in sfThumbnailPlugin, (c) Fabien Potencier)

To install the plugin for a symfony project, the usual process is to use the symfony command line.

With symfony 1.1/1.2, use:

$ symfony plugin:install sfWidgetFormInputSWFUploadPlugin

Alternatively, if you don't have PEAR installed, you can download the latest package attached to this plugin's wiki page and extract it under your project's plugins/ directory.

Clear the cache to enable the autoloading to find the new classes:

$ php symfony cc

Publish the plugins assets

$ php symfony plugin:publish-assets

You're done.


The guys managing and devolping the SWFUpload flash movie as well as its javascript api should be mentioned here. Lern more at http://swfupload.org