Module: Decidim::HasUploadValidations
- Extended by:
- ActiveSupport::Concern
- Included in:
- AccountForm, Accountability::Admin::ImportResultsForm, Admin::ImportForm, Admin::OrganizationAppearanceForm, Admin::ParticipatorySpacePrivateUserCsvImportForm, Admin::UserGroupCsvVerificationForm, Assemblies::Admin::AssemblyForm, Assemblies::Admin::AssemblyImportForm, Assembly, Attachment, AttachmentForm, Authorization, Conference, ConferenceSpeaker, Conferences::Admin::ConferenceForm, Conferences::Admin::DiplomaForm, Conferences::Admin::PartnerForm, Conferences::Partner, ContentBlockAttachment, Debates::Admin::DebateForm, Debates::DebateForm, EditorImage, InitiativesType, OAuthApplication, Organization, ParticipatoryProcess, ParticipatoryProcessGroup, ParticipatoryProcesses::Admin::ParticipatoryProcessForm, ParticipatoryProcesses::Admin::ParticipatoryProcessGroupForm, Proposals::Admin::ImportParticipatoryTextForm, Proposals::Admin::ProposalForm, Proposals::ProposalForm, System::OAuthApplicationForm, UploadValidationForm, UserBaseEntity, UserGroupForm
- Defined in:
- decidim-core/lib/decidim/has_upload_validations.rb
Instance Method Summary collapse
- #attached_uploader(attached_name) ⇒ Object
- #maximum_avatar_size ⇒ Object
- #maximum_upload_size ⇒ Object
Instance Method Details
#attached_uploader(attached_name) ⇒ Object
55 56 57 58 59 |
# File 'decidim-core/lib/decidim/has_upload_validations.rb', line 55 def attached_uploader(attached_name) uploader = attached_config.dig(attached_name, :uploader) || Decidim::ApplicationUploader uploader.new(self, attached_name) end |
#maximum_avatar_size ⇒ Object
65 66 67 |
# File 'decidim-core/lib/decidim/has_upload_validations.rb', line 65 def maximum_avatar_size Decidim.organization_settings(organization).upload_maximum_file_size_avatar end |
#maximum_upload_size ⇒ Object
61 62 63 |
# File 'decidim-core/lib/decidim/has_upload_validations.rb', line 61 def maximum_upload_size Decidim.organization_settings(organization).upload_maximum_file_size end |