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.

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.