-
Notifications
You must be signed in to change notification settings - Fork 285
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Photo metadata is nil until after AR callbacks have run #499
Comments
@kris I just tested this and I'm unable to replicate it, I'm basically using the
And
Can you try like that? |
@tommyg-cld Sorry for the late reply. It still doesn't work. Try this:
|
@kris sorry for the delay. So yes Can you explain what exactly you are trying to achieve? |
@tommyg-cld When an image is uploaded, I wanted to have a callback that is triggered on the model to cache the extracted colors from Cloudinary. I was hoping to do this within a callback, but my current solution is to have an operation/service that saves the object, then updates the objects color cache via the mounted image, then call again. Less than ideal compared to an |
@kris can you just not use after_save then? |
@tommyg-cld metadata is nil for me in |
@kris just following up to check if this is still an issue? |
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 anafter_save
on the model. Unfortunately,metadata
seems to always benil
. Once theafter_save
callback has finished, thensource.metadata
is 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)
The text was updated successfully, but these errors were encountered: