Do I need to specify all minetypes on MediaData?

Vote:
 

I'm running 7.6.3 and got a base class inheriting from MediaData

/// <summary>
    /// Model for Content of Generic Media types
    /// </summary>
    [ContentType(GUID = "bb1dbea9-828b-4337-92e0-e97574599f42")]
    public class GenericMedia : MediaData
    {
        /// <summary>
        ///  Description of the file
        /// </summary>
        public virtual string Description
        {
            get
            {
                return this.FileDescriptionOrTitle();
            }

            set 
            {
            }
        }
    }

I also have some other classes setup that inheret from GenericMedia and on these I have MediaDescriptor set

// <summary>
    /// Model for Content of type document
    /// </summary>
    [ContentType(GUID = "85468104-E06F-47E5-A317-FC9B83D3CBA6")]
    [MediaDescriptor(ExtensionString = "pdf,doc,docx,xlsx")]
    public class DocumentFile : GenericMedia
    {

My thought about MediaData was that if a type that isn't set in any class say in this case "xls" then EPiServer would fallback and use the base class GenericMedia?

But in my solution this doesn't happen. Instead I get a upload failed if I try and add files of types not specifiled in the MediaDescriptor. Is this by design or am I missing something somewhere?

#86415
May 21, 2014 10:14
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.