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"></emb... > 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.
on 2009-01-30 13:27
on 2009-01-30 13:40
Dan S. wrote: > 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. src="/player.swf?..." should work -- Rails Wheels - Find Plugins, List & Sell Plugins - http://railswheels.com