Add this line to your application's Gemfile:
gem 'fog-gridfs_mongoid', github: 'dimianstudio/fog-gridfs_mongoid', require: 'fog/gridfs'
And then execute:
$ bundle
Initialise a Fog::Storage
object using local provider
storage = Fog::Storage.new(provider: 'Gridfs')
This can then be used like any other Fog storage.
directory = storage.directories.create(key: '/')
directory.files.create(body: File.open('~/image.png'), key: 'image.png')
- Fork it ( https://github.com/dimianstudio/fog-gridfs_mongoid/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