Class: Import::GitlabProjects::RemoteFileValidator
- Inherits:
-
ActiveModel::Validator
- Object
- ActiveModel::Validator
- Import::GitlabProjects::RemoteFileValidator
- Defined in:
- app/validators/import/gitlab_projects/remote_file_validator.rb
Overview
Validates the given object’s #content_type and #content_length accordingly with the Project Import requirements
Constant Summary collapse
- ALLOWED_CONTENT_TYPES =
[ 'application/gzip', # S3 uses different file types 'application/x-tar', 'application/x-gzip' ].freeze
Instance Method Summary collapse
Instance Method Details
#validate(record) ⇒ Object
15 16 17 18 |
# File 'app/validators/import/gitlab_projects/remote_file_validator.rb', line 15 def validate(record) validate_content_length(record) validate_content_type(record) end |