class VideoFile
Public Instance Methods
file_size()
click to toggle source
# File lib/sinatra/videoman/models/video_file.rb, line 15 def file_size if file.file && (file.file.size.to_f / 2**20).round(2) > Manager.config[:max_thumb_file_size] errors.add(:file, "You cannot upload a file greater than #{Manager.config[:max_thumb_file_size]}MB") end end