Class: Decidim::RecordImageUploader

Inherits:
ImageUploader show all
Defined in:
app/uploaders/decidim/record_image_uploader.rb

Overview

This class deals with uploading record specific images that have more limited content types than the defaults.

Instance Attribute Summary

Attributes inherited from ApplicationUploader

#content_type_denylist, #model, #mounted_as, #validable_dimensions

Instance Method Summary collapse

Methods inherited from ImageUploader

#dimensions_info, #max_image_height_or_width, #validable_dimensions

Methods inherited from ApplicationUploader

#attached?, #initialize, #path, #protocol_option, #remote_url=, set_variants, #store_dir, #url, #variant, #variant_path, #variant_url, variants

Constructor Details

This class inherits a constructor from Decidim::ApplicationUploader

Instance Method Details

#content_type_allowlistObject



7
8
9
# File 'app/uploaders/decidim/record_image_uploader.rb', line 7

def content_type_allowlist
  %w(image/jpeg image/png)
end

#extension_allowlistObject



11
12
13
# File 'app/uploaders/decidim/record_image_uploader.rb', line 11

def extension_allowlist
  %w(jpeg jpg png)
end