<commit_before>class ImageUploader < CarrierWave::Uploader::Base
  include S3Identifier

  process :validate_dimensions

  # Include RMagick or MiniMagick support:
  # include CarrierWave::RMagick
  include CarrierWave::MiniMagick

  # Override the directory where uploaded files will be stored.
  # This path will be appended to the S3 bucket url.
  def store_dir
    if model.is_a?(Institution)
      "institutions/#{model.slug}/images/"
    else
      "collections_v2/#{s3_collection_uid}/images/"
    end
  end

  # Create different versions of your uploaded files:
  version :small do
    process resize_to_fit: [200, 200]
  end

  version :logo do
    process resize_to_fit: [232, 193]
  end

  version :hero_image do
    process resize_to_fit: [1261, 516]
  end

  version :hero_thumb, from_version: :hero_image do
    process resize_to_fit: [100, 100]<commit_msg>institute upload path changed to use the id<commit_after>class ImageUploader < CarrierWave::Uploader::Base
  include S3Identifier

  process :validate_dimensions

  # Include RMagick or MiniMagick support:
  # include CarrierWave::RMagick
  include CarrierWave::MiniMagick

  # Override the directory where uploaded files will be stored.
  # This path will be appended to the S3 bucket url.
  def store_dir
    if model.is_a?(Institution)
      "institutions/#{model.id}/images/"
    else
      "collections_v2/#{s3_collection_uid}/images/"
    end
  end

  # Create different versions of your uploaded files:
  version :small do
    process resize_to_fit: [200, 200]
  end

  version :logo do
    process resize_to_fit: [232, 193]
  end

  version :hero_image do
    process resize_to_fit: [1261, 516]
  end

  version :hero_thumb, from_version: :hero_image do
    process resize_to_fit: [100, 100]
{'fraction_non_alphanumeric': 0.07457627118644068, 'fraction_numerical': 0.0327683615819209, 'mean_word_length': 3.8125, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3604409', 'n_tokens_mistral': 630, 'n_tokens_neox': 556, 'n_words': 174}