Try our conversational search powered by Generative AI!

Cannot upload images using browse files features in EPIServer


I have created a EPIServer CMS site using visual studio. I am able to access the site using edit mode. I want to add some image on that site. But when I am trying to upload a image using the upload option it is showing failed message.Why it is happening do you have any idea. But when I have uploaded the images from the demp 'Aloy Site' given by EPIServer team it is uploaded successfully. Please tell the probable cause of this.

Thanks and regards

Utpal Maity

Jan 17, 2014 11:35

You need to have a class (at least one, you can have several) implementing IContentMedia (or inherit some class that implements it like e.g. MediaData, ImageData etc) in your project. It has to have ContentType attribute as well.

You can then also use MediaDescriptor attribute to control which type that should be created given file extension.

Edited, Jan 17, 2014 11:48

Hi Johan,

Can you give me an example or link from where I can found an example.



Jan 20, 2014 14:58

Simplest possible would be to add a class like:

public class GenericMedia : MediaData

but you probably want more specific types for images, videos etc. If you look in the alloy sample project you find media types under Models/Media

Jan 20, 2014 15:06

I have the same problem, think it might have something to do with IIS Express Worker Process not having write access to the Virtual Path (AppData).. Don't really know how to fix it though, does anyone else?

Jan 20, 2014 15:45
* 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.