Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

DataObjectManager Module /

Discuss the DataObjectManager module, and the related ImageGallery module.

Moderators: martimiz, UncleCheese, Sean, Ed, biapar, Willr, Ingo, swaiba

S3 Filetypes and DOM


Go to End


2 Posts   1118 Views

Avatar
otherjohn

Community Member, 125 Posts

7 October 2010 at 2:14am

Ok, got a question here. If I am using DOM to upload MP3's to the Amazon S3 servers, is there a way I can classify in my code what type of file was uploaded so I can use the MP3 functionality?

Ideas?

Avatar
UncleCheese

Forum Moderator, 4102 Posts

7 October 2010 at 12:27pm

Nope. Can't have the best of both worlds. Not until PHP supports multiple inheritance. Although, you could probably subclass the S3File class and copy over the Player() function from MP3. Not sure what else you'd need. I think it's pretty straightforward.

Ideally, of course, you don't have to duplicate any code. Multiple inheritance would allow classes to inherit from multiple parents, meaning your S3MP3 class could inherit from both S3File and MP3.

---------------
Silverstripe tips, tutorials, screencasts, and more. http://www.leftandmain.com