SWFUpload: A nicer file upload experience

SWFUpload is a small JavaScript/Flash library that tries to re-make the way file uploads works on the internet. It works by replacing the contents of a div with a small transparent flash that handles all the upload-frontend, javascript for configuration and callbacks and html/css for styling/looks. Here are some features: Only display chosen filetypes in […]

SWFUpload is a small JavaScript/Flash library that tries to re-make the way file uploads works on the internet. It works by replacing the contents of a div with a small transparent flash that handles all the upload-frontend, javascript for configuration and callbacks and html/css for styling/looks.

Here are some features:

  • Only display chosen filetypes in dialog
  • Upload multiple files at once by ctrl/shift-selecting in dialog
  • Trigger javascript functions on start, cancel, progress and complete
  • Get file information/size before upload starts
  • Style upload buttons any way you want
  • Do progress-bars/information using valid XHTML and CSS
  • No page reloads, display uploaded files as they are finished
  • Works on all platforms/browsers that has Flash support.
  • Degrades gracefully to a normal html upload form if Flash or javascript isn't available

How do i use it?

  1. Download the files: SWFUpload_beta.zip
  2. Include the javascript: <script type="text/javascript" src="" "jscripts/SWFUpload/mmSWFUpload.js"></script>
    Simple example: <script type="text/javascript">mmSWFUpload.init({ upload_backend : "../../upload.php", target : "SWFUpload", });</script>Full featured example: <script type="text/javascript">mmSWFUpload.init({ upload_backend : "../../upload.php", button_image : "images/custom_button.png", button_mouseover_image : "images/custom_button_over.png", width : "258px", height : "82px", target : "SWFUpload", allowed_filetypes : "*.gif;*.jpg;*.png", upload_start_callback : 'uploadStart', upload_progress_callback : 'uploadProgress', upload_complete_callback : 'uploadComplete', upload_error_callback : 'uploadError', upload_cancel_callback : 'uploadCancel' });</script>
    Continue for more details....

    ajaxian

    SWFUpload, Flash, A nicer file upload experience