aboutsummaryrefslogtreecommitdiffstats
path: root/activestorage/app
diff options
context:
space:
mode:
authorGeorge Claghorn <george@basecamp.com>2017-11-13 16:36:39 -0500
committerGeorge Claghorn <george@basecamp.com>2017-11-13 16:36:39 -0500
commit704a7e425ca99af1b778c764a86e5388647631dd (patch)
tree115382292c62a22a4ae2220b20f5dd94eba8ff70 /activestorage/app
parent233d6a2b563e34156c5fc2317c19dc1823447c18 (diff)
downloadrails-704a7e425ca99af1b778c764a86e5388647631dd.tar.gz
rails-704a7e425ca99af1b778c764a86e5388647631dd.tar.bz2
rails-704a7e425ca99af1b778c764a86e5388647631dd.zip
Preserve existing metadata when analyzing a blob
Closes #31138.
Diffstat (limited to 'activestorage/app')
-rw-r--r--activestorage/app/models/active_storage/blob.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/activestorage/app/models/active_storage/blob.rb b/activestorage/app/models/active_storage/blob.rb
index 99823e14c6..2aa05d665e 100644
--- a/activestorage/app/models/active_storage/blob.rb
+++ b/activestorage/app/models/active_storage/blob.rb
@@ -249,7 +249,7 @@ class ActiveStorage::Blob < ActiveRecord::Base
# You won't ordinarily need to call this method from a Rails application. New blobs are automatically and asynchronously
# analyzed via #analyze_later when they're attached for the first time.
def analyze
- update! metadata: extract_metadata_via_analyzer
+ update! metadata: metadata.merge(extract_metadata_via_analyzer)
end
# Enqueues an ActiveStorage::AnalyzeJob which calls #analyze.