Merge pull request #81 from insales/revert-79-hotfix_for_imports

Revert "Временный Хотфикс для картинок, которые грузятся импортами на NFS"
This commit is contained in:
Nastia
2022-10-14 15:20:11 +03:00
committed by GitHub

View File

@@ -168,8 +168,6 @@ module Paperclip
styles_to_upload = subject_to_post_process? ? self.class.all_styles : [:original]
files ||= styles_to_upload.each_with_object({}) do |style, result|
file = to_file(style, self.class.main_store_id)
old_path = Rails.public_path.join(key(:original))
file ||= File.open(old_path) if File.exist?(old_path)
# For easier monitoring
unless file
raise "Missing files in #{self.class.main_store_id} for #{instance.class.name}:#{instance.id}:#{style}"