ajout de la liste des extensions
This commit is contained in:
parent
a465bad405
commit
c155de1d7e
6 changed files with 102 additions and 5 deletions
|
@ -17,7 +17,7 @@
|
|||
class Champs::PieceJustificativeChamp < Champ
|
||||
MAX_SIZE = 200.megabytes
|
||||
|
||||
ACCEPTED_FORMATS = [
|
||||
ACCEPTED_CONTENT_TYPES = [
|
||||
"text/plain",
|
||||
"application/pdf",
|
||||
"application/msword",
|
||||
|
@ -34,7 +34,7 @@ class Champs::PieceJustificativeChamp < Champ
|
|||
]
|
||||
|
||||
validates :piece_justificative_file,
|
||||
content_type: ACCEPTED_FORMATS,
|
||||
content_type: ACCEPTED_CONTENT_TYPES,
|
||||
size: { less_than: MAX_SIZE },
|
||||
if: -> { !type_de_champ.skip_pj_validation }
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue