Windows Azure blob storage support for CarrierWave
With support for files bigger than 64MB, uploading by chunks, using (https://github.com/Azure/azure-storage-ruby)
Add this line to your application's Gemfile:
gem 'carrierwave-azure'
And then execute:
$ bundle
First configure CarrierWave with your Azure storage credentials
CarrierWave.configure do |config|
config.azure_storage_account_name = 'YOUR STORAGE ACCOUNT NAME'
config.azure_storage_access_key = 'YOUR STORAGE ACCESS KEY'
config.azure_storage_blob_host = 'YOUR STORAGE BLOB HOST' # optional
config.azure_container = 'YOUR CONTAINER NAME'
end
And then in your uploader, set the storage to :azure
class ExampleUploader < CarrierWave::Uploader::Base
storage :azure
end
In order to run the integration specs you will need to configure some environment variables.
A sample file is provided as spec/environment.rb.sample
.
Copy it over and plug in the appropriate values.
cp spec/environment.rb.sample spec/environment.rb
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request