Skip to content

Instantly share code, notes, and snippets.

@Heavyblade
Created April 12, 2013 22:23
Show Gist options
  • Select an option

  • Save Heavyblade/5375649 to your computer and use it in GitHub Desktop.

Select an option

Save Heavyblade/5375649 to your computer and use it in GitHub Desktop.
def fix_s3_location(key, bucket_name)
s3_connection = ::Fog::Storage.new(GroupPhotoUploader.fog_credentials)
self.remote_photo_url = s3_connection.get_object_url(bucket_name, key, 10.minutes.from_now)
self.processed = true
self.photo_filename = key.split("/").last
Resque.enqueue(Groups::GroupPhoto, bucket_name, key)
self.save!
GC.start
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment