Describe the bug in a sentence or two.
I'm trying to extract colors from an uploaded image, following the docs on utilizing cloudinary_transformation and an after_save on the model. Unfortunately, metadata seems to always be nil. Once the after_save callback has finished, then source.metadata is populated. This seems like a misplaced lifecycle callback or something.
Issue Type (Can be multiple)
Steps to reproduce
class PhotoUploader < CarrierWave::Uploader::Base
include Cloudinary::CarrierWave
cloudinary_transformation image_metadata: true, colors: true
end
class Photo < ApplicationRecord
mount_uploader :source, PhotoUploader
after_save :extract_colors
def extract_colors
# `source.metadata` is `nil`
end
end
Environment and Libraries (fill in the version numbers)
- Cloudinary Ruby SDK version - 1.23.0
- Ruby Version - 3.1.2
- Rails Version - 7.0.4
- Carrierwave - 2.2.2
Describe the bug in a sentence or two.
I'm trying to extract colors from an uploaded image, following the docs on utilizing
cloudinary_transformationand anafter_saveon the model. Unfortunately,metadataseems to always benil. Once theafter_savecallback has finished, thensource.metadatais populated. This seems like a misplaced lifecycle callback or something.Issue Type (Can be multiple)
Steps to reproduce
Environment and Libraries (fill in the version numbers)