Sha256: 71d03b99f86848107953c94cde16acbeb6d2fee31884d100e047f7caf4e9a02a
Contents?: true
Size: 588 Bytes
Versions: 29
Compression:
Stored size: 588 Bytes
Contents
class VideosController < CommonDocumentsController respond_to :html,:js def show path = @video.file.path(params[:style]) if(params[:style].present?) && Document::STYLE_FORMAT[params[:style]] path = path.split('.')[0]+'.'+Document::STYLE_FORMAT[params[:style]] end respond_to do |format| format.all {send_file path, :type => Document::STYLE_MIMETYPE[params[:style]], # CANT USE: @video.file_content_type because it is allways video/mp4 and breaks explorer and firefox :disposition => "inline"} end end end
Version data entries
29 entries across 29 versions & 2 rubygems