Rephrased AWS an Imagemagick

Hi I have a web app test running on Amazon Cloud 9. The users using the website have the ability to up load images. They currently can’t do it. as I can’t install ImageMagic let along the gem.

I there something else I can use that is the AWS Libraries?

Any suggestions.

Cheers Dave

Dave,
I believe you can utilize ‘carrierwave’ and the ‘fog-aws’ gems to get what you are looking for a solution without ImageMagick:

gem ‘carrierwave’, ‘~> 1.0’
https://github.com/carrierwaveuploader/carrierwave

gem ‘fog-aws’
https://github.com/fog/fog-aws

This is what I most recently used to upload to S3 but I think all AWS server sets can be worked with… you setup an initializer file for Carrierwave like

CarrierWave.configure do |config|

config.fog_provider = ‘fog/aws’

config.fog_credentials = {

provider: ‘AWS’,

aws_access_key_id: ENV[‘S3_ACCESS_KEY’],

aws_secret_access_key: ENV[‘S3_SECRET_KEY’],

use_iam_profile: false,

region: ‘us-west-2’, # optional, defaults to ‘us-east-1’

}

config.fog_directory = ENV[‘S3_BUCKET’]

config.fog_public = false

config.fog_attributes = { cache_control: “public, max-age=#{365.days.to_i}” } # optional, defaults to {}

end

``

Use the Carrierwave Uploader generator to create your rails uploader and change the storage to storage :fog in the uploader created.

Let me know if you have any questions… checkout the ‘fog-aws’ documentation for specifics on Amazon and setup with Carrierwave for your implementation.

-Zaven

Thanks