Merge pull request #5828 from betagouv/dev

2021-01-04-02
This commit is contained in:
LeSim 2021-01-04 16:20:51 +01:00 committed by GitHub
commit b927ef727c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -191,20 +191,26 @@ class Procedure < ApplicationRecord
validates :notice, content_type: [ validates :notice, content_type: [
"application/msword", "application/msword",
"application/pdf", "application/pdf",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"application/vnd.ms-powerpoint", "application/vnd.ms-powerpoint",
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
"application/vnd.oasis.opendocument.text",
"application/vnd.oasis.opendocument.presentation", "application/vnd.oasis.opendocument.presentation",
"application/vnd.oasis.opendocument.text",
"application/vnd.openxmlformats-officedocument.presentationml.presentation",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"image/jpeg",
"image/jpg",
"image/png",
"text/plain" "text/plain"
], size: { less_than: 20.megabytes } ], size: { less_than: 20.megabytes }
validates :deliberation, content_type: [ validates :deliberation, content_type: [
"application/msword", "application/msword",
"application/pdf", "application/pdf",
"application/vnd.oasis.opendocument.text",
"application/vnd.openxmlformats-officedocument.wordprocessingml.document", "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
"text/plain", "image/jpeg",
"application/vnd.oasis.opendocument.text" "image/jpg",
"image/png",
"text/plain"
], size: { less_than: 20.megabytes } ], size: { less_than: 20.megabytes }
validates :logo, content_type: ['image/png', 'image/jpg', 'image/jpeg'], size: { less_than: 5.megabytes } validates :logo, content_type: ['image/png', 'image/jpg', 'image/jpeg'], size: { less_than: 5.megabytes }