I want to post audio files to the site, I'll update it on regular basis. I'm seeking the way how to do it. Is there any way to do it, using standard razor script macros.
First off - Please don't double post. I've deleted the post you made in the Umbraco v7 forum to avoid too much confusion if people start to answer both posts. No need for that. If a post has been created in the wrong category don't worry. If an admin sees it he will move it to the proper category...otherwise don't worry...it's not that big a deal. The important thing is you get answers.
In regards to handling music on the website I would do the following
1: Make sure that the mime-type of the file-type is recognized by the webserver by adding the mime-type to the web.config.
2: Make sure that the default upload limitation is allowed to be more than the 4 mb, which is default. See Jeavon's article on that here http://24days.in/umbraco/2013/6-easy-configuration-tweaks/
3: Make sure to upload the files to the media section in Umbraco
4: Make a media picker on your document type where you can choose a library or a specific file
5: Fetch the media item selected using a razor macro
What version of Umbraco are you currently using? Asking since the way Razor works can differ a bit between versions.
Thank you very much Jan, much appreciated. I'm using the latest one, v 7. I'm seeking something, that will allow me to write dynamic razor script, Something like this: @{foreach(var song in @Media.AllFiles){...}}... Also could explain what kind of recognation regarding mime-type I need to do in web.config?
Music library
Hello,
I want to post audio files to the site, I'll update it on regular basis. I'm seeking the way how to do it. Is there any way to do it, using standard razor script macros.
Thanks and regards,
Azamat.
Hi Azamat and welcome to our :)
First off - Please don't double post. I've deleted the post you made in the Umbraco v7 forum to avoid too much confusion if people start to answer both posts. No need for that. If a post has been created in the wrong category don't worry. If an admin sees it he will move it to the proper category...otherwise don't worry...it's not that big a deal. The important thing is you get answers.
In regards to handling music on the website I would do the following
1: Make sure that the mime-type of the file-type is recognized by the webserver by adding the mime-type to the web.config. 2: Make sure that the default upload limitation is allowed to be more than the 4 mb, which is default. See Jeavon's article on that here http://24days.in/umbraco/2013/6-easy-configuration-tweaks/ 3: Make sure to upload the files to the media section in Umbraco 4: Make a media picker on your document type where you can choose a library or a specific file 5: Fetch the media item selected using a razor macro
What version of Umbraco are you currently using? Asking since the way Razor works can differ a bit between versions.
/Jan
Thank you very much Jan, much appreciated. I'm using the latest one, v 7. I'm seeking something, that will allow me to write dynamic razor script, Something like this: @{foreach(var song in @Media.AllFiles){...}}... Also could explain what kind of recognation regarding mime-type I need to do in web.config?
Thanks.
Azamat.
is working on a reply...