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?
I'm running 7.6.3 and got a base class inheriting from MediaData
I also have some other classes setup that inheret from GenericMedia and on these I have MediaDescriptor set
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?