Photo metadata is nil until after AR callbacks have run
@tommyg-cld đang làm issue này rồi.
Từ ngày 9/5/2023.
Đánh giá
Issue này chưa được đánh giá.
Mô tả
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
- Ngôn ngữ chính
- Ruby
- Star
- 420
- Fork
- 282
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của cloudinary/cloudinary_gem
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 55/100
cloudinary/cloudinary_gem#597 · 1 bình luận ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 52/100
cloudinary/cloudinary_gem#591 · 3 bình luận ·
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 45/100
cloudinary/cloudinary_gem#582 · 1 bình luận ·
-
404's when fetching .eml files (from Action Mailbox)Có thể làm lại được @rnamba-cloudinary đã nhận 400 ngày trước và không có pull request nào đang mở. Đang mở
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
cloudinary/cloudinary_gem#581 · 1 bình luận ·
-
BlobKey, MirrorService and Sidekiq 8 are incompatibleCó thể làm lại được @const-cloudinary đã nhận 541 ngày trước và không có pull request nào đang mở. Đang mở
cloudinary/cloudinary_gem#573 · 3 bình luận · 1 người được giao ·
Tất cả issue của cloudinary/cloudinary_gem
Issue tương tự
-
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
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 82/100
flisk-sh/flisk-labs#22 ·
-
1.severity: security
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Maintainer thường phản hồi trong vòng 1 ngày
-
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
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 68/100
Huerte/algo-solutions-python#260 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Maintainer thường phản hồi trong vòng 1 ngày
-
internal
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
Kong/developer.konghq.com#8080 ·
Maintainer thường phản hồi trong vòng 1 ngày