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
commit  2d9fca7899bc125fab3bdd636f908649cf5fe855
tree    8a246139752add8fd8d0c8a32236a4e46360f865
parent  e810b86f113e61abdc84dda790437e3b4c4c1cdc
100644 39 lines (25 sloc) 0.985 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
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