Class: DraftUploader

Inherits:
CarrierWave::Uploader::Base
  • Object
show all
Defined in:
lib/drafter/draft_uploader.rb

Overview

This CarrierWave uploader is used to steal incoming files off of draftable objects, and store them on a DraftUpload for later use.

Instance Method Summary collapse

Instance Method Details

#cache_dirObject

Directory where uploaded temp files will be stored (default is [root]/tmp)



18
19
20
# File 'lib/drafter/draft_uploader.rb', line 18

def cache_dir
  "system/draft_uploads/tmp"
end

#store_dirObject

Directory where uploaded files will be stored (default is /public/uploads)



11
12
13
# File 'lib/drafter/draft_uploader.rb', line 11

def store_dir
  "system/draft_uploads/#{model.to_param}"
end