0

I'm having performance issues with carrierwave uploads on images using Rackspace. There have been no other reasons or bugs that would identify what the issue is, and a quick test deploy using S3 solves the issues completely.

Is there any way to maintain the rackspace links and images when making the change to s3? When we change them on a staging server all url references are removed and replaced with the new url, making all images go 404.

class PostimageUploader < CarrierWave::Uploader::Base

include CarrierWave::MiniMagick

# These settings are for image updloads to rackspace
 if Rails.env.production?
  storage :fog
 else
  storage :file
 end

# Do not edit this file structure
 def store_dir
  "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
 end

 def extension_white_list
  %w(jpg jpeg gif png)
 end

end

Thanks for any help.

keade
  • 137
  • 1
  • 11
  • I answered a similar question here: http://stackoverflow.com/questions/24717309/how-can-i-migrate-carrierwave-files-to-a-new-storage-mechanism/24721991#24721991. Check it out. – San Jan 30 '15 at 15:21
  • Cheers, will review that and also write up how I fixed this up. – keade Feb 02 '15 at 08:52

0 Answers0