Pages

Wednesday, March 17, 2010

Audio Fields in Drupal


I was having a requirement where i need to have a audio file to play form  the file field in Drupal. It was really a tough time finding out the solution and finally go through it. i am giving some reference to some website  from where this article has been written.


If you haven't examined FileField, you'll have to do so by downloading the FileField module from http://drupal.org/project/filefield and enable it on the Modules administration page (by browsing to Administer | Site building | Modules, at /admin/build/modules).


Now create a new content type named Album by going to Administer | Content management | Content types | Add content type (at /admin/content/types/add). We'll next add a FileField to this by editing the new Album type and selecting the Add field tab (at /admin/content/types/album/add_field). Call it Song, select the File for the Field type, press Continue, and press ContinueWidget type as File Upload). again (leaving the
In the Permitted upload file extensions, enter mp3 for now.
If you wish, you may enter a new File path as well such as audio. Uploaded files would then be saved to that path. Note that you have access to the Tokenaudio/[user-raw], which will replace [user-raw] with the username of the node's creator: module's features here. So, for instance you may enter something like audio/[user-raw], which will replace [user-raw] with the username of the node's creator: Read More

Courtesy : http://www.packtpub.com/article/audio-fields-in-drupal

No comments:

Post a Comment