At Raketa we have our fast and reliable Images Service where we store the images for our Rails projects. With this rails engine we are able to attach it to all of our Rails projects.
Add this line to your application's Gemfile:
gem 'images_client', github: 'studioraketa/images_client'
And then execute:
$ bundle
Mount the engine in your application's routes.rb file:
mount ImagesClient::Engine, at: '/images/client'
This will expose /images/client/images
endpoint in your Rails application which can be used to upload, delte and search for images.
Setup the configuration of the engine by creating an initializer in your Rails application:
module ImagesClient
module Configuration
class << self
def service_url
# Return the URL of the Raketa Images service
end
def service_token
# Return your access token for the Raketa Images service
end
def authorized?(request)
# Implement the authorization logic here. It will be used to guard the create and destroy actions
# for images.
end
end
end
end
Contribution directions go here.
The gem is available as open source under the terms of the MIT License.