Sha256: a4220fe8d23961d87a945a1702efe6a7733d39441296cd34342a0fdc7f119cc4

Contents?: true

Size: 572 Bytes

Versions: 2

Compression:

Stored size: 572 Bytes

Contents

# frozen_string_literal: true
module Decidim
  # This class deals with uploading images to Decidim It is intended to just
  # hold the uploads configuration, so you should inherit from this class and
  # then tweak any configuration you need.
  class ApplicationUploader < CarrierWave::Uploader::Base
    storage :file

    # Override the directory where uploaded files will be stored.
    # This is a sensible default for uploaders that are meant to be mounted:
    def store_dir
      "uploads/#{model.class.to_s.underscore}/#{mounted_as}/#{model.id}"
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
decidim-core-0.0.1.alpha7 app/uploaders/decidim/application_uploader.rb
decidim-core-0.0.1.alpha6 app/uploaders/decidim/application_uploader.rb