I use carrierwave as my upload gem in rails 3.0.7, and it's really awesome.
I can upload files to local file system(storage :file), 开发者_JAVA百科and I know how to upload to AWS-S3 as well(storage :fog), but is there any way to upload files to those two destinations at the same form submit? Just in case if local file system or S3 crash or file missing, I still have another copy.
You can try this:
http://carrierwave.rubyforge.org/rdoc/classes/CarrierWave/Storage/S3.html
CarrierWave.configure do |config|
config.s3_access_key_id = "xxxxxx"
config.s3_secret_access_key = "xxxxxx"
config.s3_bucket = "my_bucket_name"
end
精彩评论