A backend for Refile which provides storage in multiple cloud storage services via the Fog cloud services gem.
If you're looking for a backend for Amazon S3, please use Refile's build in S3 backend. It is far superior to using S3 via Fog.
Add this line to your application's Gemfile:
gem 'refile-fog'
Set up Refile to use the fog backend:
# config/initializers/refile.rb
require "refile/fog"
credentials = {
provider: "Google",
aws_access_key_id: "zyx",
aws_secret_access_key: "12345",
directory: "my-app"
}
Refile.configure do |config|
config.cache = Refile::Fog::Backend.new(prefix: "cache", **credentials)
config.store = Refile::Fog::Backend.new(prefix: "store", **credentials)
end