7935 Posts in 1536 Topics by 943 members
|Go to End|
1 October 2010 at 2:54am
Hi Cheese and others!
I have a podcast page setup that uses DOM. If the podcast file called "Attachment" is setup as a class "File", it will not recognized MP3s and instead classes them as type "FILE" in the DB. Which results in the MP3 functions not working. This function did work when using swfupload but not in Uploadify.
If I set the the "Attachment" as class MP3, it works of course, but I need to allow other file types. Is FILE still the wrong class type?
static $has_one = array (
'Attachment' => 'FILE', // <-- WORKS FINE IF MP3
'SermonCastPage' => 'PodCastPage'
public function getCMSFields_forPopup()
return new FieldSet(
new FileUploadField('Attachment','Podcast Audio File'),
1 October 2010 at 3:23am
Yeah, I got rid of that feature with Uploadify. I decided it was too assuming to assign a new class to your file automatically, and that wasn't really something that belonged in an upload handler.
To save your files as MP3s, just cast them as "MP3" in your file relation instead of "File"..
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com
1 October 2010 at 3:27am
What happens if its a file extension of something like .wav or what not. Can I still class it as an MP3? or would that mess it up.
|Go to Top|