Basically used the information from "File Upload Fu" and "Demonstration of Different Ways to Play a Sound from a Web Page".
Uploaded audio file and stored it in file system just like image file using attachment_fu. Then in show.rhtml,
instead of:
<b>Audio:</b>
<%= link_to @vocabulary.public_filename %>
used:
<b>Audio:</b>
<embed src="<%=@vocabulary.public_filename %>" autostart="false" loop="false" height="20" width="200"></embed>
Of course, if there is a better way, I would like to know.
No comments:
Post a Comment