Class: Coupler::DataUploader
- Inherits:
-
CarrierWave::Uploader::Base
- Object
- CarrierWave::Uploader::Base
- Coupler::DataUploader
- Defined in:
- lib/coupler/data_uploader.rb
Instance Method Summary collapse
Instance Method Details
#cache_dir ⇒ Object
7 8 9 |
# File 'lib/coupler/data_uploader.rb', line 7 def cache_dir File.join(store_dir, 'tmp') end |
#filename ⇒ Object
11 12 13 14 15 16 17 18 |
# File 'lib/coupler/data_uploader.rb', line 11 def filename if @filename @stored_filename ||= @filename.sub(/\..+?$/, "") + '-' + Digest::SHA1.hexdigest([@filename, Time.now.utc, rand].join) + File.extname(@filename) else super end end |
#store_dir ⇒ Object
3 4 5 |
# File 'lib/coupler/data_uploader.rb', line 3 def store_dir Coupler.upload_path end |