Sha256: b47409b4f4a7fa23a803525698c197d5c12b73662e1b099d7e45de4c49af3a3e

Contents?: true

Size: 453 Bytes

Versions: 63

Compression:

Stored size: 453 Bytes

Contents

# frozen_string_literal: true

module Spotlight
  ##
  # Sir-trevor image widget uploads
  class AttachmentUploader < CarrierWave::Uploader::Base
    storage Spotlight::Engine.config.uploader_storage

    # 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

63 entries across 63 versions & 1 rubygems

Version Path
blacklight-spotlight-4.7.0 app/uploaders/spotlight/attachment_uploader.rb
blacklight-spotlight-4.6.1 app/uploaders/spotlight/attachment_uploader.rb
blacklight-spotlight-4.6.0 app/uploaders/spotlight/attachment_uploader.rb
blacklight-spotlight-4.5.0 app/uploaders/spotlight/attachment_uploader.rb
blacklight-spotlight-4.4.0 app/uploaders/spotlight/attachment_uploader.rb
blacklight-spotlight-4.3.6 app/uploaders/spotlight/attachment_uploader.rb
blacklight-spotlight-4.3.5 app/uploaders/spotlight/attachment_uploader.rb
blacklight-spotlight-4.3.4 app/uploaders/spotlight/attachment_uploader.rb
blacklight-spotlight-4.3.3 app/uploaders/spotlight/attachment_uploader.rb
blacklight-spotlight-4.3.2 app/uploaders/spotlight/attachment_uploader.rb
blacklight-spotlight-4.3.1 app/uploaders/spotlight/attachment_uploader.rb
blacklight-spotlight-4.3.0 app/uploaders/spotlight/attachment_uploader.rb
blacklight-spotlight-4.2.0 app/uploaders/spotlight/attachment_uploader.rb
blacklight-spotlight-4.1.2 app/uploaders/spotlight/attachment_uploader.rb
blacklight-spotlight-4.1.1 app/uploaders/spotlight/attachment_uploader.rb
blacklight-spotlight-4.1.0 app/uploaders/spotlight/attachment_uploader.rb
blacklight-spotlight-4.0.3 app/uploaders/spotlight/attachment_uploader.rb
blacklight-spotlight-4.0.2 app/uploaders/spotlight/attachment_uploader.rb
blacklight-spotlight-4.0.1 app/uploaders/spotlight/attachment_uploader.rb
blacklight-spotlight-4.0.0 app/uploaders/spotlight/attachment_uploader.rb