Class: ThumbUploader
- Inherits:
-
CarrierWave::Uploader::Base
- Object
- CarrierWave::Uploader::Base
- ThumbUploader
show all
- Includes:
- Sinatra::Videoman
- Defined in:
- lib/sinatra/videoman/thumb_uploader.rb
Constant Summary
Sinatra::Videoman::VERSION
Instance Method Summary
collapse
Instance Method Details
#extension_white_list ⇒ Object
13
14
15
|
# File 'lib/sinatra/videoman/thumb_uploader.rb', line 13
def extension_white_list
Manager.config[:thumb_file_extensions]
end
|
#filename ⇒ Object
17
18
19
20
21
22
|
# File 'lib/sinatra/videoman/thumb_uploader.rb', line 17
def filename
if original_filename
@name ||= Digest::MD5.hexdigest(File.dirname(current_path))
"#{@name}.#{file.extension}"
end
end
|
#store_dir ⇒ Object
9
10
11
|
# File 'lib/sinatra/videoman/thumb_uploader.rb', line 9
def store_dir
Manager.config[:thumb_upload_dir]
end
|