-
Notifications
You must be signed in to change notification settings - Fork 72
Rails 1.x
Clone git repository in a temp folder.
Copy temp_foler/lib/s3_swf_upload.rb to myrails_app/lib/s3_swf_upload.rb Copy temp_foler/lib/patch/integer.rb to myrails_app/lib/patch/integer.rb Copy temp_foler/lib/s3_swf_upload/.rb to myrails_app/lib/s3_swf_upload/.rb
Template files: Copy temp_foler/lib/s3_swf_upload/railties/generators/uploader/templates/amazon_s3.yml to myrails_app/config/amazon_s3.yml Copy temp_foler/lib/s3_swf_upload/railties/generators/uploader/templates/s3_uploads_controller.rb to myrails_app/app/controllers/s3_uploads_controller.rb Copy temp_foler/lib/s3_swf_upload/railties/generators/uploader/templates/s3_upload.js to myrails_app/public/javascripts/s3_upload.js Copy temp_foler/lib/s3_swf_upload/railties/generators/uploader/templates/s3_upload.swf to myrails_app/public/flash/s3_upload.swf Copy temp_foler/lib/s3_swf_upload/railties/generators/uploader/templates/s3_up_button.gif to myrails_app/public/flash/s3_up_button.gif Copy temp_foler/lib/s3_swf_upload/railties/generators/uploader/templates/s3_down_button.gif to myrails_app/public/flash/s3_down_button.gif Copy temp_foler/lib/s3_swf_upload/railties/generators/uploader/templates/s3_over_button.gif to myrails_app/public/flash/s3_over_button.gif
I already had an amazon_s3.yml so I had to copy a few extra params into the file (max_file_size, acl)
My amazon_s3.yml file had an attribute 'bucket_name' instead of 'bucket', I so had to change line 23 of lib/s3_swf_upload/s3_config.rb
Added this to the bottom of my environment.rb file: S3SwfUpload::S3Config.load_config
replace references to Rails.root (line:11) or Rails.env (lines:15,18) in the lib/s3_swf_upload/s3_config.rb file.
Comment out "require 's3_swf_upload/railtie' if defined?(Rails)" in s3_swf_upload.rb (line:9)
Added this to my routes file: map.resources :s3_uploads
Upload the crossdomain.xml file.
I had to create lib/patch/fixnum.rb to patch lib/s3_swf_upload/signature.rb:146:
class Fixnum def ord self end end