7913 Posts in 1355 Topics by 930 members
DataObjectManager Module
SilverStripe Forums » DataObjectManager Module » MP3 & Dom
Discuss the DataObjectManager module, and the related ImageGallery module.
Moderators: martimiz, UncleCheese, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 578 Views |
-
MP3 & Dom

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?
CODE:
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'),
....
);
-
Re: MP3 & Dom

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 -
Re: MP3 & Dom

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.
-
Re: MP3 & Dom

1 October 2010 at 4:16am
No, it's MP3 only. It's always been that way...
--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com
| 578 Views | ||
|
Page:
1
|
Go to Top |

