Forums / Setup & design / Uploading new related objects

Uploading new related objects

Author Message

Jon Staines

Monday 10 September 2007 5:48:01 am

How do you get eZ Publish to make a new object of a specific class based on the type of file that you upload?

I tried the following in upload.ini.append.php

[CreateSettings]
MimeClassMap[audio/mpeg3]=mp3_audio
MimeClassMap[audio/x-mpeg-3]=mp3_audio

[mp3_audio_ClassSettings]
FileAttribute=file
NameAttribute=name
NamePattern=<original_filename_base>

But even though it said it was of file type audio/mpeg, it was made as a file class rather than the mp3_audio class I was hoping for.

Thanks in advance for any replies.

Jon Staines

Wednesday 12 September 2007 2:14:12 am

Never mind, the answer was there in front of me. I had audio/mpeg3 when the file was audio/mpeg.