Rails paperclip problem

Posted by palani on Stack Overflow See other posts from Stack Overflow or by palani
Published on 2009-10-14T11:29:19Z Indexed on 2010/04/05 8:03 UTC
Read the original article Hit count: 310

Filed under:

I have uploaded the video into my rails application by using thoughtbot-paperclip then the video is converted into "flv" format by using ffmpeg. For your reference here I specified some of my model sample code:


has_attached_file :source,:styles => {:thumb => "137x85>" }

If i specified :url or :path option it doesn't worked correctly.

In my view I played my video by using the following line:

<%= @model.source.url.gsub(/\?.*/,'')%>

If i use <%= @model.source.url%>, the video is not played.

When do the puts for video url it shows me the video URL as /source/original/sample/sample.fly?22000009. I knew that the last portion is a timestamp, but i want to use <%= @model.source.url%>. What's my mistake here can any one correct me please?

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about flv