add image to notice and deliberation valid content type

This commit is contained in:
simon lehericey 2021-01-04 15:13:26 +01:00
parent 99852fd65a
commit d43c7364fc

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 }