Procházet zdrojové kódy

Fix file names being obfuscated on update when file didn't change (#12857)

Fix #12849
master^2
Eugen Rochko před 4 roky
committed by GitHub
rodič
revize
3287ec8ca3
V databázi nebyl nalezen žádný známý klíč pro tento podpis ID GPG klíče: 4AEE18F83AFDEB23
1 změnil soubory, kde provedl 1 přidání a 1 odebrání
  1. +1
    -1
      app/models/concerns/attachmentable.rb

+ 1
- 1
app/models/concerns/attachmentable.rb Zobrazit soubor

@@ -74,7 +74,7 @@ module Attachmentable
self.class.attachment_definitions.each_key do |attachment_name|
attachment = send(attachment_name)

next if attachment.blank?
next if attachment.blank? || attachment.queued_for_write[:original].blank?

attachment.instance_write :file_name, SecureRandom.hex(8) + File.extname(attachment.instance_read(:file_name))
end


Načítá se…
Zrušit
Uložit