First test
This commit is contained in:
parent
8812ba2507
commit
1a3c19f48c
4 changed files with 14 additions and 0 deletions
6
app/services/clamav_service.rb
Normal file
6
app/services/clamav_service.rb
Normal file
|
@ -0,0 +1,6 @@
|
|||
class ClamavService
|
||||
def self.safe_file? path
|
||||
|
||||
|
||||
end
|
||||
end
|
|
@ -13,6 +13,10 @@ class PiecesJustificativesService
|
|||
unless piece_justificative.save
|
||||
errors << piece_justificative.errors.messages[:content][0]+" (#{piece_justificative.libelle})"+"<br>"
|
||||
end
|
||||
|
||||
unless ClamavService.safe_file? piece_justificative.content
|
||||
|
||||
end
|
||||
end
|
||||
end
|
||||
errors
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue