Skip to content

ncri/s3_uploader_example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

34 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

S3 Uploader Rails Example

Based on the great jQuery File Upload plugin: blueimp.github.com/jQuery-File-Upload/

Features:

  • No flash :)

  • File Progress Indicator (Chrome, Firefox, Safari)

  • Multiple file selection, parallel upload (Chrome, Firefox, Safari)

  • Drag’n’Drop (Firefox 4+, Safari 5+ - buggy on windows, Google Chrome)

  • Internet Explorer and Opera fall back to iframe transport single file uploads

Tested with Chrome, Firefox, Safari, Opera and IE 7

Get’s around S3’s lacking cross domain access header support by storing the upload form on s3, embedded in an iframe. Upload progress is displayed on the host server by utilizing postMessage browser communication.

Getting Started

  1. Install gems

    bundle install
    
  2. Make sure the following environment variables are set:

    ENV['S3_UPLOADER_BUCKET']
    ENV['S3_UPLOADER_ACCESS_KEY']
    ENV['S3_UPLOADER_SECRET_ACCESS_KEY']
    
  3. Deploy uploader javascript and form to s3

    bundle exec rake uploader:deploy
    

About

S3 Uploader Rails Example (uses the jQuery-File-Upload plugin)

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published