Adds TrueVault support to CarrierWave
Add this line to your application's Gemfile:
gem 'carrierwave-truevault', github: 'ianyamey/carrierwave-truevault'
And then execute:
$ bundle
-
Create a new vault from your TrueVault console
-
Add a configuration block in your
config/initializers/carrierwave.rb
file.
CarrierWave.configure do |config|
config.truevault_api_key = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
config.truevault_vault_id = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx'
end
- Set your uploader to use the
truevault
storage engine
class SecureFileUploader < CarrierWave::Uploader::Base
storage :truevault
end
- This work was inspired by @codemancode and his gem, which is based on HTTParty.
- Fork it ( https://github.com/ianyamey/carrierwave-truevault/fork )
- 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 a new Pull Request