public
Description: A rails plugin which allow user upload files to S3 through an embedded flash directly.
Homepage: http://elctech.com
Clone URL: git://github.com/elcgit/s3-swf-upload-plugin.git
Zhang Yuanyi (author)
Mon Apr 27 11:58:02 -0700 2009
name age message
file .gitignore Mon Nov 17 05:11:17 -0800 2008 update plugin, improt flex source files [lgn21st]
file MIT-LICENSE Mon Nov 17 00:50:09 -0800 2008 initial commit [Zhang Yuanyi]
file README Loading commit data...
file Rakefile Mon Nov 17 00:50:09 -0800 2008 initial commit [Zhang Yuanyi]
file crossdomain.xml Mon Nov 17 00:50:09 -0800 2008 initial commit [Zhang Yuanyi]
directory flex_src/
directory generators/
file init.rb Mon Nov 17 00:50:09 -0800 2008 initial commit [Zhang Yuanyi]
file install.rb Mon Nov 17 00:50:09 -0800 2008 initial commit [Zhang Yuanyi]
directory lib/
directory tasks/ Mon Nov 17 00:50:09 -0800 2008 initial commit [Zhang Yuanyi]
directory test/ Mon Nov 17 00:50:09 -0800 2008 initial commit [Zhang Yuanyi]
file uninstall.rb Mon Nov 17 00:50:09 -0800 2008 initial commit [Zhang Yuanyi]
README
S3SwfUpload
===========

S3SwfUpload allow user uploading a file to S3 directly, so you can save the cost of uploading process in your app 
server.

Install
=======

$ script/plugin install git://github.com/elcgit/s3-swf-upload-plugin.git

Usage
=======

1. $ script/generate s3_swf_upload

2. configure amazon_s3.yml, and run below two tasks to create bucket and crossdomain.xml:

  $ rake s3:make_bucket
  $ rake s3:make_crossdomain

3. init s3_swf object:

  <%= s3_swf_upload_tag %>

4. when you click upload, your file will be upload to http://bucket.s3.amazonasw.com/s3_swf/ by default.

5. if you want to custom its behavior, here's a more complex example:

  <%= s3_swf_upload_tag(:width => 310, 
        :height => 40, 
        :success => 'alert("success");',
        :failed => 'alert("failed");',
        :selected => 'alert("selected");',
        :canceled => 'alert("canceled");',
        :prefix => 's3') 
  %>

Copyright (c) 2008 elctech, released under the MIT license