Class: Hyrax::UploadedFileUploader

Inherits:
CarrierWave::Uploader::Base
  • Object
show all
Defined in:
app/uploaders/hyrax/uploaded_file_uploader.rb

Instance Method Summary collapse

Instance Method Details

#cache_dirObject


10
11
12
# File 'app/uploaders/hyrax/uploaded_file_uploader.rb', line 10

def cache_dir
  (configured_cache_path / model.class.to_s.underscore / mounted_as.to_s / model.id.to_s).to_s
end

#store_dirObject

Override the directory where uploaded files will be stored. This is a sensible default for uploaders that are meant to be mounted:


6
7
8
# File 'app/uploaders/hyrax/uploaded_file_uploader.rb', line 6

def store_dir
  (configured_upload_path / model.class.to_s.underscore / mounted_as.to_s / model.id.to_s).to_s
end