Hi,
I have a form which lets users upload an flv file to the database, this
should then be played by the "player.swf" file in the public
directory.
This worked fine when on the homepage as I just referenced
"player.swf"
in the html embed tag and it worked fine.
<embed
src="player.swf?file=/homepages/homepageclipurl/2.flv&autoStart=true"
width="193" height="209" quality="high"
type="application/x-shockwave-flash"
pluginspage="http://www.macromedia.com/go/getflashplayer"></embed>
>
However if I left that directory eg homepage/something else, I had to
change the link to the swf file to make it work, like this.
<embed src="../player.swf?
I wanted to be able to use the same code throughout my application, so I
thought Rails.root would help, but for some reason, the video does not
display when using this technique.
Rails.root = "C:/Users/Me/Desktop/myapp"
<embed src="<%= Rails.root+"/public/player.swf" %>
(Which is then
converted to..)
<embed src="C:/Users/Me/Desktop/myapp/public/player.swf?
Can anyone help me shed any light on why this might not be working?
Many Thanks.
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Ruby on Rails: Talk" group.
To post to this group, send email to
rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---