Photo metadata is nil until after AR callbacks have run
@tommyg-cld arbeitet bereits daran.
Seit 09.5.2023.
Bewertung
Dieses Issue wurde noch nicht bewertet.
Beschreibung
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)
- Build - Cannot install or import the SDK
- Performance - Performance issues
- Behaviour - Functions are not working as expected (such as generate URL)
- Documentation - Inconsistency between the docs and behaviour
- Other (Specify)
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
- Vorherrschende Sprache
- Ruby
- Sterne
- 420
- Forks
- 282
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Entwicklungsumgebung
- Kein Dockerfile und keine Docker-Compose-Datei
- Hat eine Pull-Request-Vorlage
- Beitragsleitfaden lesen
Erste Schritte
- Lesen Sie das ganze Issue und danach den Beitragsleitfaden des Projekts.
- Schreiben Sie ins Issue, dass Sie es übernehmen — das erspart doppelte Arbeit.
- Forken Sie das Repository und arbeiten Sie in einem Branch.
- Öffnen Sie einen Pull Request, der die Issue-Nummer nennt.
Mehr aus cloudinary/cloudinary_gem
-
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 55/100
cloudinary/cloudinary_gem#597 · 1 Kommentar ·
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 52/100
cloudinary/cloudinary_gem#591 · 3 Kommentare ·
-
Schwierigkeit 3/5 1-2 Tage Anfängerfreundlichkeit 45/100
cloudinary/cloudinary_gem#582 · 1 Kommentar ·
-
404's when fetching .eml files (from Action Mailbox)Evtl. wieder frei @rnamba-cloudinary hat das vor 400 Tagen übernommen, und es ist kein Pull Request offen. Offen
Schwierigkeit 4/5 3-5 Tage Anfängerfreundlichkeit 30/100
cloudinary/cloudinary_gem#581 · 1 Kommentar ·
-
BlobKey, MirrorService and Sidekiq 8 are incompatibleEvtl. wieder frei @const-cloudinary hat das vor 541 Tagen übernommen, und es ist kein Pull Request offen. Offen
cloudinary/cloudinary_gem#573 · 3 Kommentare · 1 zugewiesene Person ·
Alle Issues in cloudinary/cloudinary_gem
Ähnliche Issues
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 65/100
metacall/core#964 · 1 Kommentar ·
Maintainer antworten meist innerhalb von 1 Tag
-
area: ci benchmark build developer-experience difficulty: easy dx enhancement github-actions good first issue hacktoberfest help wanted performance quality rank: 8 kyu ruby tech: ruby
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 82/100
flisk-sh/flisk-labs#22 ·
-
1.severity: security
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 62/100
Maintainer antworten meist innerhalb von 1 Tag
-
15-minutes 5-minutes algorithm any-language beginner-friendly c cpp csharp easy go good first issue hacktoberfest help wanted java javascript kotlin python rust swift typescript
Schwierigkeit 1/5 Unter einer Stunde Anfängerfreundlichkeit 68/100
Huerte/algo-solutions-python#260 ·
Maintainer antworten meist innerhalb von 1 Tag
-
Schwierigkeit 2/5 1-3 Stunden Anfängerfreundlichkeit 72/100
Maintainer antworten meist innerhalb von 1 Tag