Class: Decidim::Cw::RecordImageUploader

Inherits:
ImageUploader show all
Defined in:
app/uploaders/decidim/cw/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

#validable_dimensions

Instance Method Summary collapse

Methods inherited from ImageUploader

#dimensions_info, #max_image_height_or_width, #strip, #validable_dimensions, #validate_dimensions, #validate_size

Methods inherited from ApplicationUploader

#downloader, #provider, set_variants, #store_dir, #variant, variants

Instance Method Details

#content_type_allowlistObject



7
8
9
# File 'app/uploaders/decidim/cw/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/cw/record_image_uploader.rb', line 11

def extension_allowlist
  %w(jpeg jpg png)
end