Class: VideoUploader
- Inherits:
-
CarrierWave::Uploader::Base
- Object
- CarrierWave::Uploader::Base
- VideoUploader
- Defined in:
- app/uploaders/video_uploader.rb
Instance Method Summary collapse
- #default_url ⇒ Object
-
#png_name(for_file, version_name) ⇒ Object
# Create a thumbnail version :gallery_thumb do process thumbnail: [‘jpg’, quality: 10, size: “100x100”, strip: true, logger: Rails.logger] def full_filename for_file png_name for_file, version_name end end.
Instance Method Details
#default_url ⇒ Object
24 25 26 |
# File 'app/uploaders/video_uploader.rb', line 24 def default_url ActionController::Base.helpers.asset_path("assetable/" + [version_name, "video.png"].compact.join('_')) end |
#png_name(for_file, version_name) ⇒ Object
# Create a thumbnail version :gallery_thumb do
process thumbnail: [{format: 'jpg', quality: 10, size: "100x100", strip: true, logger: Rails.logger}]
def full_filename for_file
png_name for_file, version_name
end
end
20 21 22 |
# File 'app/uploaders/video_uploader.rb', line 20 def png_name for_file, version_name %Q{#{version_name}_#{for_file.chomp(File.extname(for_file))}.jpg} end |