1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2024-12-12 23:09:03 +01:00
fab-manager/app/models/project_cao.rb

10 lines
367 B
Ruby

# frozen_string_literal: true
# CAD file attached to a project documentation
class ProjectCao < Asset
mount_uploader :attachment, ProjectCaoUploader
validates :attachment, file_size: { maximum: Rails.application.secrets.max_cao_size&.to_i || 5.megabytes.to_i }
validates :attachment, file_mime_type: { content_type: ENV['ALLOWED_MIME_TYPES'].split(' ') }
end