Module: Shrine::Plugins::ValidateVirusFree::AttacherMethods
- Defined in:
- lib/shrine/plugins/validate_virus_free.rb
Instance Method Summary collapse
Instance Method Details
#validate_virus_free(message: nil) ⇒ Object
10 11 12 13 14 15 16 |
# File 'lib/shrine/plugins/validate_virus_free.rb', line 10 def validate_virus_free(message: nil) Datadog::Tracing.trace('Scan Upload for Viruses') do cached_path = get.download.path result = Common::VirusScan.scan(cached_path) result.safe? || add_error_msg( || result.body) end end |