Ruby on Rails
Thursday, January 24, 2019
Thanks
On Thu, Jan 24, 2019 at 5:44 PM <faktsonly@gmail.com> wrote:
Dave,--
I believe you can utilize 'carrierwave' and the 'fog-aws' gems to get what you are looking for a solution without ImageMagick: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 likeCarrierWave.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 = falseconfig.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.-ZavenOn Wednesday, January 16, 2019 at 1:38:41 AM UTC-6, David Merrick wrote: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.
Cell 027 3089 169
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/CA%2B%3DMcKbgqnodoD9b-OTS9HDJu4G5Gqna0S-iPE22Lu11XFHaLw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment