Skip to content
This repository was archived by the owner on Oct 6, 2020. It is now read-only.

A rails plugin which allow user upload files to S3 through an embedded flash directly. Started with GreenAsJade fork, created whole new UI for multiple file upload.

License

Notifications You must be signed in to change notification settings

PRX/s3-swf-upload-plugin

Repository files navigation

S3SwfUpload
===========

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

Install
=======

Install goes here.

Usage
=======

1. $ script/generate s3_swf_upload

2. Configure your amazon parameters.  Either set these through the
   following environment variables:

        AMAZON_S3_SWF_UPLOAD_BUCKET => my_public_bucket
        AMAZON_ACCESS_KEY_ID        => secret
        AMAZON_SECRET_ACCESS_KEY    => very secret
        AMAZON_S3_SWF_UPLOAD_ACL    => public-read
  
   or hardcode them in     config/amazon_s3.yml

    The acl will default to private.
   
3. Upload a crossdomain.xml in your bucket and make it public-read.

   You can find what you need in generators/s3-swf-upload/templates in
   the plugin!

4. init s3_swf object:

  <%= s3_swf_upload_tag %>

5. When you click upload, your file will be upload to http://bucket.s3.amazonasw.com/ by default.

   IE the default prefix is '' (no prefix)

6. if you want to customise 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");',
        :prefix => 'prefix_in_bucket',
        :upload => 'Press Here To Activate Upload') 
  %>

  In this case, files will be uploaded to http://bucket.s3.amazonasw.com/prefix_in_bucket/filename

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

About

A rails plugin which allow user upload files to S3 through an embedded flash directly. Started with GreenAsJade fork, created whole new UI for multiple file upload.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • ActionScript 50.6%
  • JavaScript 27.8%
  • Ruby 21.6%