Try our conversational search powered by Generative AI!



I have:

[Display(Name = "AnyMedia", GroupName = SystemTabNames.Content, Order = 5)]
public virtual ContentReference AnyMediaReference { get; set; }


[Display(Name = "Video", GroupName = SystemTabNames.Content, Order = 4)]
public virtual ContentReference VideoReference { get; set; }


[ContentType(GUID = "85468104-E06F-47E5-A317-FC9B83D3CBA6")]
[MediaDescriptor(ExtensionString = "wmv,mp4")]
public class VideoFile : VideoData
public virtual string Description { get; set; }


Uploaded a mp4 file with success and when dragging it towards by two property I can only drag the file to "AnyMedia" not to "Video". I thought both would work.


Any idea how this work?

Apr 09, 2014 11:27

Also, if you are using UIHint.MediaFile for any media, you need some kind of logic to see what kind of media is added right?

Apr 09, 2014 11:29


This is working on my local EPiServer 7.5 MVC-based site (though it has nothing to do with Web Forms or MVC). There was a change to this in one of the NUGET packages that came after the 7.5 release although I can't really see how that should affect you. Have you upgraded to the latest packages or if not, can you try and see if this solves your problem?

Apr 09, 2014 14:23

I updated framework and core from nuget, restarted visual studio and tried again with same problem. Is this what you mean by upgrade?

Also installed a new 7.5 MVC alloy site from depoyment center (not sure if this needs to be updated after installation) but it didn't work in this solution.

Apr 09, 2014 15:39

Try adding the latest version of the EPiServer.CMS.UI package to see if that helps since the change was done there.

Apr 09, 2014 16:20

Thanks Linus. Updated that package aswell. Had to manually delete some folders like CMS in Modules etc.


Apr 10, 2014 10:09

Hi Magnus,

Even i tried UIHint.MediaFile and UIHint.Video and both are working normal.

Apr 10, 2014 10:11

Hope I made it clear that it worked? :-)

Apr 10, 2014 10:48

Great to hear Magnus!

Apr 10, 2014 11:19

About my other question in this thread

"Also, if you are using UIHint.MediaFile for any media, you need some kind of logic to see what kind of media is added right?"

I tried to create two shared view under catalog DisplayTemplates called Media Video and Image. My idea was to render Video.cshtml view if you add a video to property with UIHint.MediaFile and Image.cshtml if an image is added. But it didn't work. Created a MediaFile.cshtml and then it worked. But now I need to add logic in this view to see what kind of media to render.


Any idea how to make this as clean as possible?

Apr 10, 2014 12:37

@Magnus: Sorry for the late reply, but I think that this blog post answers your question.

May 07, 2014 9:34
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.