Sha256: 9a9ead036a4acca3767139f05a546249607076c06bb1274a0bfd2a6999d85c96

Contents?: true

Size: 510 Bytes

Versions: 1

Compression:

Stored size: 510 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 => params[:style]=="thumb" ? "image/png" : @video.file_content_type,
                  :disposition => "inline"}
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
social_stream-documents-0.2.3 app/controllers/videos_controller.rb