Ruby on Rails
Wednesday, January 23, 2019
Dave,
I believe you can utilize 'carrierwave' and the 'fog-aws' gems to get what you are looking for a solution without ImageMagick:
On Wednesday, January 16, 2019 at 1:38:41 AM UTC-6, David Merrick wrote:
-- 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
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
Use the Carrierwave Uploader generator to create your rails uploader and change the storage to storage :fog in the uploader created.
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 {}endUse 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
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
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rubyonrails-talk+unsubscribe@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/rubyonrails-talk/6521b3f7-1f61-4270-8e93-001bc28b8a1e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment